object_hook = None
        if orm:
            object_hook = XComDecoder.orm_object_hook
        if result.value is None:
            return None
        if conf.getboolean("core", "enable_xcom_pickling"):
            try:
                return pickle.loads(result.value)
            except pickle.UnpicklingError:
                return json.loads(result.value.decode("UTF-8"), cls=XComDecoder, object_hook=object_hook)
        else:
            try:
                return json.loads(result.value.decode("UTF-8"), cls=XComDecoder, object_hook=object_hook)
            except (json.JSONDecodeError, UnicodeDecodeError):
                return pickle.loads(result.value)
    @staticmethod
    def deserialize_value(result: XCom) -> Any:
        """Deserialize XCom value from str or pickle object"""
        return BaseXCom._deserialize_value(result, False)
    def orm_deserialize_value(self) -> Any:
        """
        Deserialize method which is used to reconstruct ORM XCom object.
        This method should be overridden in custom XCom backends to avoid
        unnecessary request or other resource consuming operations when
        creating XCom orm model. This is used when viewing XCom listing
        in the webserver, for example.
        """
        return BaseXCom._deserialize_value(self, True)
class _LazyXComAccessIterator(collections.abc.Iterator):