import copy


def deepcopy(cfg):
    """Recursively copy the config

    Parameters
    ----------
    cfg : Config
        The config to copy

    Returns
    -------
    Config
        The copy of the input config
    """
    return copy.deepcopy(cfg)