code: def iterate_over_fields(cls):
          
          for attr in dir(cls):
              clsattr = getattr(cls, attr)
              if isinstance(clsattr, BaseField):
                  yield attr, clsattr
docs: Iterate through fields as `(attribute_name, field_instance)`.