code: def generate_field(name, data):
      
      assert 'type' in data
      field = TYPES_TO_FIELDS.get(data['type'], Unknown)(name, data)
      return field
docs: Generate a well-typed field according to the data dictionary supplied
      (obtained via the `fields_get' method of any models).