def METHOD_NAME(
    config_schema: object,
    required_resource_keys: Optional[AbstractSet[str]] = None,
    loader_version: Optional[str] = None,
    external_version_fn: Optional[Callable[[object], str]] = None,
) -> Callable[[DagsterTypeLoaderFn], DagsterTypeLoaderFromDecorator]:
    """Create an dagster type loader that maps config data to a runtime value.
    The decorated function should take the execution context and parsed config value and return the
    appropriate runtime value.
    Args:
        config_schema (ConfigSchema): The schema for the config that's passed to the decorated
            function.
        loader_version (str): (Experimental) The version of the decorated compute function. Two
            loading functions should have the same version if and only if they deterministically
            produce the same outputs when provided the same inputs.
        external_version_fn (Callable): (Experimental) A function that takes in the same parameters as the loader
            function (config_value) and returns a representation of the version of the external
            asset (str). Two external assets with identical versions are treated as identical to one
            another.
    Examples:
        .. code-block:: python
            @dagster_type_loader(Permissive())
            def load_dict(_context, value):
                return value
    """
    from dagster._config import resolve_to_config_type
    config_type = resolve_to_config_type(config_schema)
    assert isinstance(
        config_type, ConfigType
    ), f"{config_schema} could not be resolved to config type"
    EXPECTED_POSITIONALS = ["context", "*"]
    def wrapper(func: DagsterTypeLoaderFn) -> DagsterTypeLoaderFromDecorator:
        params = get_function_params(func)
        missing_positional = validate_expected_params(params, EXPECTED_POSITIONALS)
        if missing_positional:
            raise DagsterInvalidDefinitionError(
                f"@dagster_type_loader '{func.__name__}' decorated function does not have required"
                f" positional parameter '{missing_positional}'. @dagster_type_loader decorated"
                " functions should only have keyword arguments that match input names and a first"
                " positional parameter named 'context'."
            )
        return _create_type_loader_for_decorator(
            config_type, func, required_resource_keys, loader_version, external_version_fn
        )
    return wrapper