code: def add_field(self, field):
          
          if not isinstance(field, fields.BaseField):
              raise ValueError('Argument "field" must be an instance of '
                               'BaseField')
          self.fields.add(field.name, field)
docs: Add a field.
  
          :param field: Field to add
          :raise: ValueError if `field` is not an instance of `BaseField`.