def get_field_name(self, field):
for field_name, f in self.fields.items():<EOL><INDENT>if f == field:<EOL><INDENT>return field_name<EOL><DEDENT><DEDENT>raise AttributeError("<STR_LIT>" % (<EOL>field, self.__class__))<EOL>
Returns the field name for a given field.