code: def dict2schema(dct, schema_class=ma.Schema):
      
      attrs = dct.copy()
  
      class Meta(object):
          if MARSHMALLOW_VERSION_INFO[0] < 3:
              strict = True
          else:
              register = False
  
      attrs["Meta"] = Meta
      return type(str(""), (schema_class,), attrs)
docs: Generate a `marshmallow.Schema` class given a dictionary of
      `Fields <marshmallow.fields.Field>`.