def convert(nested_dict):
    """
    Convert nested dict with bytes to str.
    This is needed because bytes are not JSON serializable.

    :param nested_dict: nested dict with bytes
    """
    if isinstance(nested_dict, dict):
        return {convert(k): convert(v) for k, v in nested_dict.items()}
    elif isinstance(nested_dict, list):
        return [convert(v) for v in nested_dict]
    elif isinstance(nested_dict, tuple):
        return tuple(convert(v) for v in nested_dict)
    elif (
        isinstance(nested_dict, str)
        or isinstance(nested_dict, int)
        or isinstance(nested_dict, float)
    ):
        return nested_dict
    else:
        return str(nested_dict)