class_docstr: Extends Marshmallow schema so that we can pass a Model to load
  (following marshmallow-sqlalchemy pattern). This is useful
  to perform partial model merges on HTTP PUT
class_docstr_tok: ["Extends","Marshmallow","schema","so","that","we","can","pass","a","Model","to","load","(","following","marshmallow-sqlalchemy","pattern",")",".","This","is","useful","to","perform","partial","model","merges","on","HTTP","PUT"]
docstr: Creates a Model object from POST or PUT requests. PUT will use self.instance
  previously fetched from the endpoint handler
  
  :param data: Schema data payload
  :param discard: List of fields to not set on the model
docstr_tok: ["Creates","a","Model","object","from","POST","or","PUT","requests",".","PUT","will","use","self.instance","previously","fetched","from","the","endpoint","handler",":","param","data",":","Schema","data","payload",":","param","discard",":","List","of","fields","to","not","set","on","the","model"]
code: def make_object(
      self, data: dict[Any, Any], discard: Optional[list[str]] = None
  ) -> Model:
      """
      Creates a Model object from POST or PUT requests. PUT will use self.instance
      previously fetched from the endpoint handler
  
      :param data: Schema data payload
      :param discard: List of fields to not set on the model
      """
      discard = discard or []
      if not self.instance:
          self.instance = (
              self.__class_model__()
          )  # pylint: disable=not-callable
      for field in data:
          if field not in discard:
              setattr(self.instance, field, data.get(field))
      return self.instance
  
file_path: superset/superset/views/base_schemas.py
imports: from collections.abc import Iterable, Mapping, Sequence
  from typing import Any, Optional, Union
  from flask import current_app, g
  from flask_appbuilder import Model
  from marshmallow import post_load, pre_load, Schema, ValidationError
  from sqlalchemy.exc import NoResultFound
  from superset.utils.core import get_user_id
label_desc: Use image node_id 3 for calling the BaseSupersetSchema obj's underlying member method code with example usage: obj.make_object(data, discard) and returns: self