from typing import Tuple
from functools import reduce


def location_in_dict(*, address: Tuple, dict_name: str = "user") -> str:
    """Convert tuple of keys of a ``JSONDict`` to its representation in code.

    For example, given ``("a", "b", "c")`` returns the string ``user['a']['b']['c']``.

    Parameters
    ----------
    address : Tuple[str]
    dict_name : str

    Returns
    -------
    where : str
    """
    return reduce(lambda x, y: x + f"['{y}']", address, "user")