code: def _get_default_field_kwargs(model, field):
          
          kwargs = {}
          try:
              field_name = field.model_attr or field.index_fieldname
              model_field = model._meta.get_field(field_name)
              kwargs.update(get_field_kwargs(field_name, model_field))
  
              # Remove stuff we don't care about!
              delete_attrs = [
                  "allow_blank",
                  "choices",
                  "model_field",
                  "allow_unicode",
              ]
              for attr in delete_attrs:
                  if attr in kwargs:
                      del kwargs[attr]
          except FieldDoesNotExist:
              pass
  
          return kwargs
docs: Get the required attributes from the model field in order
          to instantiate a REST Framework serializer field.