code: def pre_add(self, item: SavedQuery) -> None:
      item.user = g.user
  
imports: import json
  import logging
  from datetime import datetime
  from io import BytesIO
  from typing import Any
  from zipfile import is_zipfile, ZipFile
  from flask import g, request, Response, send_file
  from flask_appbuilder.api import expose, protect, rison, safe
  from flask_appbuilder.models.sqla.interface import SQLAInterface
  from flask_babel import ngettext
  from superset import is_feature_enabled
  from superset.commands.importers.exceptions import IncorrectFormatError, NoValidFilesFoundError
  from superset.commands.importers.v1.utils import get_contents_from_bundle
  from superset.commands.query.delete import DeleteSavedQueryCommand
  from superset.commands.query.exceptions import SavedQueryDeleteFailedError, SavedQueryNotFoundError
  from superset.commands.query.export import ExportSavedQueriesCommand
  from superset.commands.query.importers.dispatcher import ImportSavedQueriesCommand
  from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP, RouteMethod
  from superset.databases.filters import DatabaseFilter
  from superset.extensions import event_logger
  from superset.models.sql_lab import SavedQuery
  from superset.queries.saved_queries.filters import SavedQueryAllTextFilter, SavedQueryFavoriteFilter, SavedQueryFilter, SavedQueryTagFilter
  from superset.queries.saved_queries.schemas import get_delete_ids_schema, get_export_ids_schema, openapi_spec_methods_override
  from superset.views.base_api import BaseSupersetModelRestApi, requires_form_data, statsd_metrics
label_desc: Use image node_id 1 for calling the SavedQueryRestApi obj's underlying member method code with example usage: obj.pre_add(item) without return types