def METHOD_NAME(package):
    """
    Get the :class:`CategoryDescription` from a package.
    The package global namespace is inspected for global variables
    (upper case versions of :class:`CategoryDescription` parameters)
    Parameters
    ----------
    package : `module` or `str`
        A package containing the category. Can be passed
        as a string (qualified import name).
    """
    if isinstance(package, str):
        package = __import__(package, fromlist=[""])
    package_name = package.__name__
    qualified_name = package_name
    name = getattr(package, "NAME", None)
    description = getattr(package, "DESCRIPTION", None)
    long_description = getattr(package, "LONG_DESCRIPTION", None)
    author = getattr(package, "AUTHOR", None)
    author_email = getattr(package, "AUTHOR_EMAIL", None)
    maintainer = getattr(package, "MAINTAINER", None)
    maintainer_email = getattr(package, "MAINTAINER_MAIL", None)
    url = getattr(package, "URL", None)
    help = getattr(package, "HELP", None)
    keywords = getattr(package, "KEYWORDS", None)
    widgets = getattr(package, "WIDGETS", None)
    priority = getattr(package, "PRIORITY", sys.maxsize - 1)
    icon = getattr(package, "ICON", None)
    background = getattr(package, "BACKGROUND", None)
    hidden = getattr(package, "HIDDEN", None)
    if priority == sys.maxsize - 1 \
            and name is not None and name.lower() == "prototypes":
        priority = sys.maxsize
    return CategoryDescription(
        name=name,
        qualified_name=qualified_name,
        package=qualified_name,
        description=description,
        long_description=long_description,
        help=help,
        author=author,
        author_email=author_email,
        maintainer=maintainer,
        maintainer_email=maintainer_email,
        url=url,
        keywords=keywords,
        widgets=widgets,
        priority=priority,
        icon=icon,
        background=background,
        hidden=hidden)