def get_method(name, method_type):
    """
    Return a callable function for the method corresponding to the given
    name.

    Parameters
    ----------
    name: str
        Name of the method. The available options are:\n

        diagnostics:
        [nothing pre-installed]

        ensemblestats:
        pre-installed: mean, excprob, banddepth

        Additional options might exist if plugins are installed.

    method_type: {'diagnostics', 'ensemblestats'}
            Type of the method (see tables above).

    """

    if isinstance(method_type, str):
        method_type = method_type.lower()
    else:
        raise TypeError(
            "Only strings supported for for the method_type"
            + " argument\n"
            + "The available types are: 'diagnostics', 'ensemblestats'"
        ) from None

    if isinstance(name, str):
        name = name.lower()
    else:
        raise TypeError(
            "Only strings supported for the method's names.\n"
            + "\nAvailable diagnostics names:"
            + str(list(_diagnostics_methods.keys()))
            + "\nAvailable ensemblestats names:"
            + str(list(_ensemblestats_methods.keys()))
        ) from None

    if method_type == "diagnostics":
        methods_dict = _diagnostics_methods
    elif method_type == "ensemblestats":
        methods_dict = _ensemblestats_methods
    else:
        raise ValueError(
            "Unknown method type {}\n".format(method_type)
            + "The available types are: 'diagnostics', 'ensemblestats'"
        ) from None

    try:
        return methods_dict[name]
    except KeyError:
        raise ValueError(
            "Unknown {} method {}\n".format(method_type, name)
            + "The available methods are:"
            + str(list(methods_dict.keys()))
        ) from None
Return a callable function for the method corresponding to the given
name.

Parameters
----------
name: str
Name of the method. The available options are:\n

diagnostics:
[nothing pre-installed]

ensemblestats:
pre-installed: mean, excprob, banddepth

Additional options might exist if plugins are installed.

method_type: {'diagnostics', 'ensemblestats'}
Type of the method (see tables above).
pysteps/postprocessing/interface.py