def METHOD_NAME(metric: str) -> Callable:
    """
    Look for the metric by name in the globally imported objects. If the given metric is a full module path, it will
    be imported from the path.
    :param metric: The metric name or a full module path to import the metric.
    :return: The imported metric function.
    :raise MLRunInvalidArgumentError: If the metric name was not found within the global imports.
    """
    # Check if the metric is inside a module path:
    module = None  # type: Union[ModuleType, str, None]
    if "." in metric:
        module, metric = metric.rsplit(".", 1)
    # Look for the metric in the globals dictionary (it was imported before):
    if metric in globals():
        return globals()[metric]
    # Import the metric from the given module:
    if module is not None:
        # Check if the module is already imported:
        if module in sys.modules:
            # It is already imported:
            module = sys.modules[module]
        else:
            # Import the module:
            module = importlib.import_module(module)
        imported_metric = getattr(module, metric)
        globals().update({metric: imported_metric})
        return imported_metric
    # Metric string was not provided properly:
    raise mlrun.errors.MLRunInvalidArgumentError(
        f"The metric {metric} was not found in the global imports dictionary meaning it was not "
        f"imported. In order to import it during the run, please provide the full module path to the"
        f"metric. For example: 'module.sub_module.metric' will be parsed as "
        f"from module.sub_module import metric."
    )