def _get_context_loader(self, context, path):
        load = None

        # use EntityRegistry.__getitem__()->PropRegistry here so
        # that the path is stated in terms of our base
        search_path = dict.__getitem__(path, self)

        # search among: exact match, "attr.*", "default" strategy
        # if any.
        for path_key in (
            search_path._loader_key,
            search_path._wildcard_path_loader_key,
            search_path._default_path_loader_key
        ):
            if path_key in context.attributes:
                load = context.attributes[path_key]
                break

        return load
dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/orm/interfaces.py/StrategizedProperty._get_context_loader/original