def METHOD_NAME():
    '''
    this is done inside a function, so that the slow import of matplotlib is not done
    in ``from music21 import *`` unless it's actually needed.
    Returns a namedtuple: (matplotlib, Axes3D, collections, patches, plt, networkx)
    '''
    if 'matplotlib' in _missingImport:
        raise GraphException(
            'could not find matplotlib, graphing is not allowed')  # pragma: no cover
    import matplotlib  # type: ignore  # eventually: https://pypi.org/project/data-science-types/
    # backend can be configured from config file, matplotlibrc,
    # but an early test broke all processing
    # matplotlib.use('WXAgg')
    try:
        from mpl_toolkits.mplot3d import Axes3D  # type: ignore
    except ImportError:  # pragma: no cover
        Axes3D = None
        environLocal.warn(
            'mpl_toolkits.mplot3d.Axes3D could not be imported -- likely cause is an '
            + 'old version of six.py (< 1.9.0) on your system somewhere'
        )
    from matplotlib import collections
    from matplotlib import patches
    # from matplotlib.colors import colorConverter
    import matplotlib.pyplot as plt  # type: ignore
    try:
        # noinspection PyPackageRequirements
        import networkx  # type: ignore
    except ImportError:  # pragma: no cover
        networkx = None  # use for testing
    return ExtendedModules(matplotlib, Axes3D, collections, patches, plt, networkx)