def equal_ignore_order(a, b):
  """
  Used to check whether the two edge lists have the same edges 
  when elements are neither hashable nor sortable.
  """
  unmatched = list(b)
  for element in a:
    try:
      unmatched.remove(element)
    except ValueError:
      return False
  return not unmatched
Used to check whether the two edge lists have the same edges 
  when elements are neither hashable nor sortable.