code: def test_auth_custom_auth() -> None:
      from superset.db_engine_specs.trino import TrinoEngineSpec
  
      database = Mock()
      auth_class = Mock()
  
      auth_method = "custom_auth"
      auth_params = {"params1": "params1", "params2": "params2"}
      database.encrypted_extra = json.dumps(
          {"auth_method": auth_method, "auth_params": auth_params}
      )
  
      with patch.dict(
          "superset.config.ALLOWED_EXTRA_AUTHENTICATIONS",
          {"trino": {"custom_auth": auth_class}},
          clear=True,
      ):
          params: dict[str, Any] = {}
          TrinoEngineSpec.update_params_from_encrypted_extra(
              database, params
          )
  
          connect_args = params.setdefault("connect_args", {})
          assert connect_args.get("http_scheme") == "https"
  
          auth_class.assert_called_once_with(**auth_params)
  
imports: import copy
  import json
  from datetime import datetime
  from typing import Any, Optional
  from unittest.mock import Mock, patch
  import pandas
  import pytest
  from pytest_mock import MockerFixture
  from sqlalchemy import types
  from trino.sqlalchemy import datatype
  import superset.config
  from superset.constants import QUERY_CANCEL_KEY, QUERY_EARLY_CANCEL_KEY, USER_AGENT
  from superset.superset_typing import ResultSetColumnType, SQLAColumnType
  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 8 for calling a global function with example usage: test_auth_custom_auth() without return types