code: def test_import_assets(
      mocker: MockFixture,
      client: Any,
      full_api_access: None,
  ) -> None:
      """
      Test importing assets.
      """
      mocked_contents = {
          "metadata.yaml": (
              "version: 1.0.0\ntype: assets\ntimestamp: '2022-01-01T00:00:00+00:00'\n"
          ),
          "databases/example.yaml": "<DATABASE CONTENTS>",
      }
  
      ImportAssetsCommand = mocker.patch(
          "superset.importexport.api.ImportAssetsCommand"
      )
  
      root = Path("assets_export")
      buf = BytesIO()
      with ZipFile(buf, "w") as bundle:
          for path, contents in mocked_contents.items():
              with bundle.open(str(root / path), "w") as fp:
                  fp.write(contents.encode())
      buf.seek(0)
  
      form_data = {
          "bundle": (buf, "assets_export.zip"),
          "passwords": json.dumps(
              {
                  "assets_export/databases/imported_database.yaml": "SECRET"
              }
          ),
      }
      response = client.post(
          "/api/v1/assets/import/",
          data=form_data,
          content_type="multipart/form-data",
      )
      assert response.status_code == 200
      assert response.json == {"message": "OK"}
  
      passwords = {
          "assets_export/databases/imported_database.yaml": "SECRET"
      }
      ImportAssetsCommand.assert_called_with(
          mocked_contents,
          passwords=passwords,
          ssh_tunnel_passwords=None,
          ssh_tunnel_private_keys=None,
          ssh_tunnel_priv_key_passwords=None,
      )
  
file_path: superset/tests/unit_tests/importexport/api_test.py
imports: import json
  from io import BytesIO
  from pathlib import Path
  from typing import Any
  from zipfile import is_zipfile, ZipFile
  from pytest_mock import MockFixture
  from superset import security_manager
label_desc: Use image node_id 2 for calling a global function with example usage: test_import_assets(mocker, client, full_api_access) without return types