Step - subgraph
subgraph ยท category: Sack and side effects
Collects the incoming edges with both endpoints into a graph side effect; cap() it or use to_graph() (see the book page Set Side Effects).
Forms
subgraph()
subgraph(arg1: string)
Example
g.v(1).out_e("knows").subgraph("sg").cap("sg").next().v().count().next() // 3