# Path: librosa/util/exceptions.py
# class ParameterError(LibrosaError):
#     """Exception class for mal-formed inputs"""
# 
#     pass
# 
# Path: librosa/util/decorators.py
# def deprecate_positional_args(func=None, *, version="0.10"):
#     """Decorator for methods that issues warnings for positional arguments.
#     Using the keyword-only argument syntax in pep 3102, arguments after the
#     * will issue a warning when passed as a positional argument.
#     Parameters
#     ----------
#     func : callable, default=None
#         Function to check arguments on.
#     version : callable, default="0.10"
#         The version when positional arguments will result in error.
#     """
# 
#     def _inner_deprecate_positional_args(f):
#         sig = signature(f)
#         kwonly_args = []
#         all_args = []
# 
#         for name, param in sig.parameters.items():
#             if param.kind == Parameter.POSITIONAL_OR_KEYWORD:
#                 all_args.append(name)
#             elif param.kind == Parameter.KEYWORD_ONLY:
#                 kwonly_args.append(name)
# 
#         @wraps(f)
#         def inner_f(*args, **kwargs):
#             extra_args = len(args) - len(all_args)
#             if extra_args <= 0:
#                 return f(*args, **kwargs)
# 
#             # extra_args > 0
#             args_msg = [
#                 "{}={}".format(name, arg)
#                 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
#             ]
#             args_msg = ", ".join(args_msg)
#             warnings.warn(
#                 f"Pass {args_msg} as keyword args. From version "
#                 f"{version} passing these as positional arguments "
#                 "will result in an error",
#                 FutureWarning,
#                 stacklevel=2,
#             )
#             kwargs.update(zip(sig.parameters, args))
#             return f(**kwargs)
# 
#         return inner_f
# 
#     if func is not None:
#         return _inner_deprecate_positional_args(func)
# 
#     return _inner_deprecate_positional_args


import os
import glob
import json
import pooch
from pathlib import Path
from pkg_resources import resource_filename
from .exceptions import ParameterError
from .decorators import deprecate_positional_args
    For a list of examples (and their keys), see `librosa.util.list_examples`.

    By default, local files will be cached in the directory given by
    `pooch.os_cache('librosa')`.  You can override this by setting
    an environment variable ``LIBROSA_DATA_DIR`` prior to importing librosa.

    Parameters
    ----------
    key : str
        The identifier for the recording (see `list_examples`)

    See Also
    --------
    librosa.util.example
    librosa.util.list_examples
    pooch.os_cache
    """

    if key not in __TRACKMAP:
        raise ParameterError("Unknown example key: {}".format(key))

    license = __GOODBOY.fetch(__TRACKMAP[key]["path"] + ".txt")

    with open(license, "r") as fdesc:
        print("{:10s}\t{:s}".format(key, __TRACKMAP[key]["desc"]))
        print("-" * 68)
        for line in fdesc:
            print(line)



# Path: librosa/util/exceptions.py
# class ParameterError(LibrosaError):
#     """Exception class for mal-formed inputs"""
# 
#     pass
# 
# Path: librosa/util/decorators.py
# def deprecate_positional_args(func=None, *, version="0.10"):
#     """Decorator for methods that issues warnings for positional arguments.
#     Using the keyword-only argument syntax in pep 3102, arguments after the
#     * will issue a warning when passed as a positional argument.
#     Parameters
#     ----------
#     func : callable, default=None
#         Function to check arguments on.
#     version : callable, default="0.10"
#         The version when positional arguments will result in error.
#     """
# 
#     def _inner_deprecate_positional_args(f):
#         sig = signature(f)
#         kwonly_args = []
#         all_args = []
# 
#         for name, param in sig.parameters.items():
#             if param.kind == Parameter.POSITIONAL_OR_KEYWORD:
#                 all_args.append(name)
#             elif param.kind == Parameter.KEYWORD_ONLY:
#                 kwonly_args.append(name)
# 
#         @wraps(f)
#         def inner_f(*args, **kwargs):
#             extra_args = len(args) - len(all_args)
#             if extra_args <= 0:
#                 return f(*args, **kwargs)
# 
#             # extra_args > 0
#             args_msg = [
#                 "{}={}".format(name, arg)
#                 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
#             ]
#             args_msg = ", ".join(args_msg)
#             warnings.warn(
#                 f"Pass {args_msg} as keyword args. From version "
#                 f"{version} passing these as positional arguments "
#                 "will result in an error",
#                 FutureWarning,
#                 stacklevel=2,
#             )
#             kwargs.update(zip(sig.parameters, args))
#             return f(**kwargs)
# 
#         return inner_f
# 
#     if func is not None:
#         return _inner_deprecate_positional_args(func)
# 
#     return _inner_deprecate_positional_args


# Path: librosa/util/files.py
import os
import glob
import json
import pooch
from pathlib import Path
from pkg_resources import resource_filename
from .exceptions import ParameterError
from .decorators import deprecate_positional_args

    For a list of examples (and their keys), see `librosa.util.list_examples`.

    By default, local files will be cached in the directory given by
    `pooch.os_cache('librosa')`.  You can override this by setting
    an environment variable ``LIBROSA_DATA_DIR`` prior to importing librosa.

    Parameters
    ----------
    key : str
        The identifier for the recording (see `list_examples`)

    See Also
    --------
    librosa.util.example
    librosa.util.list_examples
    pooch.os_cache
    """

    if key not in __TRACKMAP:
        raise ParameterError("Unknown example key: {}".format(key))

    license = __GOODBOY.fetch(__TRACKMAP[key]["path"] + ".txt")

    with open(license, "r") as fdesc:
        print("{:10s}\t{:s}".format(key, __TRACKMAP[key]["desc"]))
        print("-" * 68)
        for line in fdesc:
            print(line)



@deprecate_positional_args