def _getrefnum(self, value):
    if isinstance(value, _scalars):
        return self._objtable[(type(value), value)]
    elif isinstance(value, plistlib.Data):
        return self._objtable[(type(value.data), value.data)]
    else:
        return self._objidtable[id(value)]
def _getrefnum(self, value):
    if isinstance(value, _scalars):
        return self._objtable[(type(value), value)]
    elif isinstance(value, plistlib.Data):
        return self._objtable[(type(value.data), value.data)]
    else:
        return self._objidtable[id(value)]