def get_siblings(x, collection=None):
 parents = get_parents(x, collection)
 siblings = set([])
 for parent in parents:
  siblings.update(get_children(parent, collection))
 siblings.discard(x)
 return list(siblings)

def get_siblings ( x , collection = None ) : parents = get_parents ( x , collection ) siblings = set ( [ ] ) for parent in parents : siblings . update ( get_children ( parent , collection ) ) siblings . discard ( x ) return list ( siblings )
get sibling random variables of input .