code: def _remove_duplicates(objects):
      
      seen = {}
      result = []
      for item in objects:
          marker = id(item)
          if marker in seen:
              continue
          seen[marker] = 1
          result.append(item)
      return result
docs: Remove duplicate objects.
  
      Inspired by http://www.peterbe.com/plog/uniqifiers-benchmark