def METHOD_NAME(self, category=None):
    # type: (Union[CategoryDescription, str, None]) -> List[WidgetDescription]
    """
    Return a list of all widgets in the registry. If `category` is
    specified return only widgets which belong to the category.
    Parameters
    ----------
    category : :class:`CategoryDescription` or str, optional
        Return only descriptions of widgets belonging to the category.
    """
    if category is None:
        categories = self.categories()
    elif isinstance(category, str):
        categories = [self.category(category)]
    else:
        categories = [category]
    METHOD_NAME = []
    for cat in categories:
        if isinstance(cat, str):
            cat = self.category(cat)
        cat_widgets = self._categories_dict[cat.name][1]
        METHOD_NAME.extend(sorted(cat_widgets,
                              key=attrgetter("priority")))
    return METHOD_NAME