def merge_dict(primary, secondary):
    """ Merge secondary into primary (maximum depth = 2).
    If a key exists in secondary, overwrite the value of the same key in primary with the value in secondary.
    :param primary: dictionary
    :param secondary: dictionary
    :return: None
    """
    for k, v in secondary.items():
        section = primary.get(k, None)
        if section is None or not isinstance(v, dict):
            primary[k] = v
        else:
            for key, value in v.items():
                section[key] = value
    return primary
