code: def upload_excel(
      filename: str,
      table_name: str,
      extra: Optional[dict[str, str]] = None,
  ):
      excel_upload_db_id = get_upload_db().id
      form_data = {
          "excel_file": open(filename, "rb"),
          "name": table_name,
          "database": excel_upload_db_id,
          "sheet_name": "Sheet1",
          "if_exists": "fail",
          "index_label": "test_label",
      }
      if schema := utils.get_example_default_schema():
          form_data["schema"] = schema
      if extra:
          form_data.update(extra)
      return get_resp(
          test_client, "/exceltodatabaseview/form", data=form_data
      )
  
imports: import json
  import logging
  import os
  import shutil
  from typing import Optional, Union
  from unittest import mock
  import pandas
  import pytest
  import superset.utils.database
  from superset.sql_parse import Table
  from tests.integration_tests.conftest import ADMIN_SCHEMA_NAME
  from superset import db
  from superset import security_manager
  from superset.models.core import Database
  from superset.utils import core
  from tests.integration_tests.test_app import app, login
  from tests.integration_tests.base_tests import get_resp, SupersetTestCase
label_desc: Use image node_id 9 for calling a global function with example usage: upload_excel(filename, table_name, extra) and returns: get_resp