def get_field(self, name):
        """
        Gets the XML field object of the given name.
        """
        # Quicker in case the exact name was used.
        field = self._all_fields.get(name)
        if field is not None:
            return field

        for field_name, field in self._all_fields.items():
            if self._sanitize_field_name(name) == self._sanitize_field_name(field_name):
                return field
def get_field ( self , name ) : field = self . _all_fields . get ( name ) if field is not None : return field for field_name , field in self . _all_fields . items ( ) : if self . _sanitize_field_name ( name ) == self . _sanitize_field_name ( field_name ) : return field
Gets the XML field object of the given name.