def param_names(params):
    """Get the names of the parameters, no matter if they are a dict or list of dicts."""
    try:
        names = params.keys()
    except AttributeError:
        names = [p["name"] for p in params]
    return names