def ignore_attrs_method(path, parent, children):
  """Remove auto generated attrs methods.

  Args:
    path: A tuple of name parts forming the attribute-lookup path to this
      object. For `tf.keras.layers.Dense` path is:
        ("tf","keras","layers","Dense")
    parent: The parent object.
    children: A list of (name, value) pairs. The attributes of the patent.

  Returns:
    A filtered list of children `(name, value)` pairs. With all attrs auto
    generated methods removed (e.g., __eq__, __ge__, __gt__)
  """
  del path
  del parent
  new_children = []
  for (name, obj) in children:
    if name in ['__eq__', '__ge__', '__gt__', '__le__', '__lt__', '__ne__']:
      continue
    new_children.append((name, obj))
  return new_children