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