code: def _get_distinct_objs(objs):
      
      ids = set()
      res = []
      for obj in objs:
          if not id(obj) in ids:
              ids.add(id(obj))
              res.append(obj)
      return res
docs: Return a list with distinct elements of "objs" (different ids).
      Preserves order.