code: def test_get_time_grain_with_config():
      """Should concatenate from configs and then sort in the proper order"""
      config = app.config.copy()
  
      app.config["TIME_GRAIN_ADDON_EXPRESSIONS"] = {
          "mysql": {
              "PT2H": "foo",
              "PT4H": "foo",
              "PT6H": "foo",
              "PT8H": "foo",
              "PT10H": "foo",
              "PT12H": "foo",
              "PT1S": "foo",
          }
      }
  
      with app.app_context():
          time_grains = MySQLEngineSpec.get_time_grain_expressions()
          assert set(time_grains.keys()) == {
              None,
              "PT1S",
              "PT1M",
              "PT1H",
              "PT2H",
              "PT4H",
              "PT6H",
              "PT8H",
              "PT10H",
              "PT12H",
              "P1D",
              "P1W",
              "P1M",
              "P3M",
              "P1Y",
              "1969-12-29T00:00:00Z/P1W",
          }
  
      app.config = config
  
imports: import datetime
  from unittest import mock
  import pytest
  from superset.connectors.sqla.models import TableColumn
  from superset.db_engine_specs import load_engine_specs
  from superset.db_engine_specs.base import BaseEngineSpec, BasicParametersMixin, builtin_time_grains, LimitMethod
  from superset.db_engine_specs.mysql import MySQLEngineSpec
  from superset.db_engine_specs.sqlite import SqliteEngineSpec
  from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
  from superset.sql_parse import ParsedQuery
  from superset.utils.database import get_example_database
  from tests.integration_tests.db_engine_specs.base_tests import TestDbEngineSpec
  from tests.integration_tests.test_app import app
  from ..fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from ..fixtures.energy_dashboard import load_energy_table_data, load_energy_table_with_slice
  from ..fixtures.pyodbcRow import Row
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_time_grain_with_config() without return types