def clean_dict(dictionary, to_del='_'):
    """
    Delete dictionary items with keys starting with specified string

    Works recursively

    Args:
        :dictionary: Dictionary object
        :to_del: Starts-with identifier
    """

    to_delete = []
    for k, v in dictionary.items():
        if isinstance(v, dict):
            v = clean_dict(v)
        if k.startswith('_'):
            to_delete.append(k)

    for k in to_delete:
        del dictionary[k]
    return dictionary