docs: def _get_model_objs_to_update_and_create(model_objs, unique_fields, update_fields, extant_model_objs):
      """
      Used by bulk_upsert to gather lists of models that should be updated and created.
      """
  
      # Find all of the objects to update and all of the objects to create
      model_objs_to_update, model_objs_to_create = list(), list()
      for model_obj in model_objs:
          extant_model_obj = extant_model_objs.get(tuple(getattr(model_obj, field) for field in unique_fields), None)
          if extant_model_obj is None:
              # If the object needs to be created, make a new instance of it
              model_objs_to_create.append(model_obj)
          else:
              # If the object needs to be updated, update its fields
              for field in update_fields:
                  setattr(extant_model_obj, field, getattr(model_obj, field))
              model_objs_to_update.append(extant_model_obj)
  
      return model_objs_to_update, model_objs_to_create