code: def test_get_schema_from_engine_params() -> None:
      """
      Test the ``get_schema_from_engine_params`` method.
      """
      from superset.db_engine_specs.postgres import PostgresEngineSpec
  
      assert (
          PostgresEngineSpec.get_schema_from_engine_params(
              make_url("postgresql://user:password@host/db1"), {}
          )
          is None
      )
  
      assert (
          PostgresEngineSpec.get_schema_from_engine_params(
              make_url("postgresql://user:password@host/db1"),
              {"options": "-csearch_path=secret"},
          )
          == "secret"
      )
  
      assert (
          PostgresEngineSpec.get_schema_from_engine_params(
              make_url("postgresql://user:password@host/db1"),
              {"options": "-c search_path = secret -cfoo=bar -c debug"},
          )
          == "secret"
      )
  
      with pytest.raises(Exception) as excinfo:
          PostgresEngineSpec.get_schema_from_engine_params(
              make_url("postgresql://user:password@host/db1"),
              {"options": "-csearch_path=secret,public"},
          )
      assert str(excinfo.value) == (
          "Multiple schemas are configured in the search path, which means "
          "Superset is unable to determine the schema of unqualified table "
          "names and enforce permissions."
      )
  
file_path: superset/tests/unit_tests/db_engine_specs/test_postgres.py
imports: from datetime import datetime
  from typing import Any, Optional
  import pytest
  from pytest_mock import MockFixture
  from sqlalchemy import types
  from sqlalchemy.dialects.postgresql import DOUBLE_PRECISION, ENUM, JSON
  from sqlalchemy.engine.url import make_url
  from superset.exceptions import SupersetSecurityException
  from superset.utils.core import GenericDataType
  from tests.unit_tests.db_engine_specs.utils import assert_column_spec, assert_convert_dttm
  from tests.unit_tests.fixtures.common import dttm
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_schema_from_engine_params() without return types