code: func (t *Tree) TraverseSiblings(node string, siblingCriteriaFunc func(RDFGraph, string) (string, error), each func(RDFGraph, string, int) error) error {
  	triples := t.g.WithPredObj(t.predicate, Resource(node))
  
  	if len(triples) == 0 {
  		return each(t.g, node, 0)
  	}
  
  	if len(triples) != 1 {
  		return fmt.Errorf("tree[%s]: node %s with more than 1 parent: %v", t.predicate, node, triples)
  	}
  
  	otherChildTriples := t.g.WithSubjPred(triples[0].Subject(), t.predicate)
  
  	var childs []string
  	for _, c := range otherChildTriples {
  		child, ok := c.Object().Resource()
  		if !ok {
  			return fmt.Errorf("object is not a resource identifier")
  		}
  		childs = append(childs, child)
  	}
  
  	sort.Strings(childs)
  
  	nodeCriteria, err := siblingCriteriaFunc(t.g, node)
  	if err != nil {
  		return err
  	}
  
  	for _, child := range childs {
  		childCriteria, err := siblingCriteriaFunc(t.g, child)
  		if err != nil {
  			return err
  		}
  		if nodeCriteria == childCriteria {
  			if err := each(t.g, child, 0); err != nil {
  				return err
  			}
  		}
  	}
  
  	return nil
  }
docs: // Traverse siblings of given node. Passed function allow to output the sibling criteria