'Returns the field name for a given field.'

@classmethod
def get_field_name(cls, field):

    for (field_name, f) in cls.fields.items():
        if (f == field):
            return field_name
    raise AttributeError((u'Field    %s    does    not    exists    in    %s    resource' % (field, cls)))
