'Normalize the fields into an ordered map of {field name: param name}'

@classmethod
def normalize_fields(cls, fields):

    if isinstance(fields, dict):
        return OrderedDict(fields)
    assert is_iterable(fields), u"'fields'    must    be    an    iterable    (e.g.,    a    list,    tuple,    or    mapping)."
    assert all(((isinstance(field, six.string_types) or (is_iterable(field) and (len(field) == 2))) for field in fields)), u"'fields'    must    contain    strings    or    (field    name,    param    name)    pairs."
    return OrderedDict([((f, f) if isinstance(f, six.string_types) else f) for f in fields])
