def get_object(doc: Doc, obj):
    """Return raw object or the target of an indirect reference."""
    if isinstance(obj, complex) == True:
        ref = int(obj.imag)
        res = memoize_obj_in_cache(doc.index, doc.data[-1]['fdata'], ref, doc.cache)
        return deepcopy(res[ref])
    else: 
        return deepcopy(obj)
Return raw object or the target of an indirect reference.
pdfsyntax/docstruct.py