(d, a)
return len(paths) and not (len(paths) == 1 and len(paths[0]) == 1)
Returns whether d is a descendent of a.

  A node is not considered a descendent of itself.

  Args:
    d: A Synset.
    a: A Synset.
Returns whether d is a descendent of a.
Returns whether d is a descendent of a .
def is_descendent(d, a):
  """Returns whether d is a descendent of a.

  A node is not considered a descendent of itself.

  Args:
    d: A Synset.
    a: A Synset.
  """
  paths = get_upward_paths_from(d, end=a)
  # The second clause ensures that a node is not a descendent of itself (our
  # graphs are DAGs so this suffices to enforce this).
  return len(paths) and not (len(paths) == 1 and len(paths[0]) == 1)
def is_descendent ( d , a ) : paths = get_upward_paths_from ( d , end = a ) # The second clause ensures that a node is not a descendent of itself (our # graphs are DAGs so this suffices to enforce this). return len ( paths ) and not ( len ( paths ) == 1 and len ( paths [ 0 ] ) == 1 )