def filter_distinct_objects(self, filter_fn, objects):
    """Filter distinct objects with filter function."""
    distinct_objects = []
    for obj in objects:
      if filter_fn(other_object=obj):
        distinct_objects.append(obj)
    return distinct_objects
Filter distinct objects with filter function.
language/gscan/data/dataset.py