def convert_activity_parameters_to_list(data):
    'Convert activity parameters from dictionary to list of dictionaries'

    def _(key, value):
        dct = deepcopy(value)
        dct['name'] = key
        return dct
    for ds in data:
        if ('parameters' in ds):
            ds['parameters'] = [_(x, y) for (x, y) in ds['parameters'].items()]
    return data
Convert activity parameters from dictionary to list of dictionaries
def convert_activity_parameters_to_list(data):
    

    def _(key, value):
        dct = deepcopy(value)
        dct['name'] = key
        return dct
    for ds in data:
        if ('parameters' in ds):
            ds['parameters'] = [_(x, y) for (x, y) in ds['parameters'].items()]
    return data