def _log_ref(self, obj):
    '\n        Log a reference to an in-memory object.\n        Return True if this object is new and was assigned\n        a new ID. Otherwise return False.\n        '
    objid = id(obj)
    is_new = (objid not in self._objs)
    if is_new:
        new_id = len(self._objs)
        self._objs[objid] = new_id
    return is_new
Log a reference to an in-memory object.
Return True if this object is new and was assigned
a new ID. Otherwise return False.
def _log_ref(self, obj):
    '\n        Log a reference to an in-memory object.\n        Return True if this object is new and was assigned\n        a new ID. Otherwise return False.\n        '
    objid = id(obj)
    is_new = (objid not in self._objs)
    if is_new:
        new_id = len(self._objs)
        self._objs[objid] = new_id
    return is_new