from typing import Tuple
from typing import Dict


def process_enum_params(enum_params) -> Tuple[Dict, Dict]:
    """Condense enumerated params into two categories:
    * Params with the same values across all endpoints
    * Params with different values for some endpoints
    """
    constant_enum_params = {name: options for (path, name, options) in enum_params}

    def has_multiple_enums(name, options):
        return any([n == name and o != options for (p, n, o) in enum_params])

    def get_all_enums(name):
        """Get all enums with the given parameter name, along with their parent endpoint paths"""
        return {p: o for (p, n, o) in enum_params if n == name}

    # Find any enumerated params with same name but different values per endpoint
    variable_enum_params = {
        name: get_all_enums(name)
        for name, options in constant_enum_params.items()
        if has_multiple_enums(name, options)
    }

    for name in variable_enum_params:
        constant_enum_params.pop(name)

    return constant_enum_params, variable_enum_params