def get_single_key_value_pair(d):
    """
    Get the key and value of a length one dictionary.

    Parameters
    ----------
    d : dict
        Single element dictionary to split into key and value.

    Returns
    -------
    tuple
        of length 2, containing the key and value

    Examples
    --------

    >>> d = dict(key='value')
    >>> get_single_key_value_pair(d)
    ('key', 'value')

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