from typing import List
from typing import Dict


def sort_on_categories(methods: List[dict]) -> Dict[str, Dict[str, dict]]:
    """ Sorts methods on categories

    Returns: Dict[category: str, Dict[method_name: str, method: dict]]
    """

    categories: Dict[str, Dict[str, dict]] = {}

    for method in methods:
        category, method_name = method["name"].split(".")

        if category not in categories:
            categories.update({category: dict()})

        categories[category].update({method_name: method})

    return categories