def unlist(d: dict) -> dict:
    """Find all appearance of single element list in a dictionary and unlist it.

    :param: d: a python dictionary to be unlisted
    """
    if isinstance(d, list):
        if len(d) == 1:
            return d[0]
        return d
    if isinstance(d, dict):
        for key, val in d.items():
            if isinstance(val, list):
                if len(val) == 1:
                    d[key] = unlist(val[0])
            elif isinstance(val, dict):
                unlist(val)
        return d
    return d