def METHOD_NAME(exporter, nb, **kw):
    """
    Export a notebook object using specific exporter class.
    Parameters
    ----------
    exporter : ``Exporter`` class or instance
        Class or instance of the exporter that should be used.  If the
        method initializes its own instance of the class, it is ASSUMED that
        the class type provided exposes a constructor (``__init__``) with the same
        signature as the base Exporter class.
    nb : :class:`~nbformat.NotebookNode`
        The notebook to export.
    config : config (optional, keyword arg)
        User configuration instance.
    resources : dict (optional, keyword arg)
        Resources used in the conversion process.
    Returns
    -------
    tuple
        output : str
            The resulting converted notebook.
        resources : dictionary
            Dictionary of resources used prior to and during the conversion
            process.
    """
    # Check arguments
    if exporter is None:
        msg = "Exporter is None"
        raise TypeError(msg)
    elif not isinstance(exporter, Exporter) and not issubclass(exporter, Exporter):
        msg = "exporter does not inherit from Exporter (base)"
        raise TypeError(msg)
    if nb is None:
        msg = "nb is None"
        raise TypeError(msg)
    # Create the exporter
    resources = kw.pop("resources", None)
    exporter_instance = exporter if isinstance(exporter, Exporter) else exporter(**kw)
    # Try to convert the notebook using the appropriate conversion function.
    if isinstance(nb, NotebookNode):
        output, resources = exporter_instance.from_notebook_node(nb, resources)
    elif isinstance(nb, (str,)):
        output, resources = exporter_instance.from_filename(nb, resources)
    else:
        output, resources = exporter_instance.from_file(nb, resources)
    return output, resources