def get_single_key_value_pair(d):
    """
    Returns the key and value of a one element dictionary, checking that it actually has only one element

    Parameters
    ----------
    d : dict

    Returns
    -------
    tuple

    """
    assert isinstance(d, dict), f'{d}'
    assert len(d) == 1, f'{d}'
    return list(d.keys())[0], list(d.values())[0]
