code: private boolean isSegment(SNode currNode) {
  
      List<SRelation<SNode, SNode>> edges = currNode.getGraph().getOutRelations(currNode.getId());
  
      if (edges != null && edges.size() > 0) {
        for (SRelation<SNode, SNode> edge : edges) {
          if (edge.getTarget() instanceof SToken) {
            return true;
          }
        }
      }
  
      return false;
    }
docs: Checks, if there exists an SRelation which targets a SToken.