code: def test_query_cache_key_changes_when_datasource_is_updated(self):
      self.login(username="admin")
      payload = get_query_context("birth_names")
  
      # construct baseline query_cache_key
      query_context = ChartDataQueryContextSchema().load(payload)
      query_object = query_context.queries[0]
      cache_key_original = query_context.query_cache_key(query_object)
  
      # make temporary change and revert it to refresh the changed_on property
      datasource = DatasourceDAO.get_datasource(
          session=db.session,
          datasource_type=DatasourceType(payload["datasource"]["type"]),
          datasource_id=payload["datasource"]["id"],
      )
      description_original = datasource.description
      datasource.description = "temporary description"
      db.session.commit()
      datasource.description = description_original
      db.session.commit()
  
      # create new QueryContext with unchanged attributes, extract new query_cache_key
      query_context = ChartDataQueryContextSchema().load(payload)
      query_object = query_context.queries[0]
      cache_key_new = query_context.query_cache_key(query_object)
  
      # the new cache_key should be different due to updated datasource
      self.assertNotEqual(cache_key_original, cache_key_new)
  
imports: import re
  import time
  from typing import Any
  import numpy
  import pandas
  import pytest
  from pandas import DateOffset
  from superset import db
  from superset.charts.schemas import ChartDataQueryContextSchema
  from superset.common.chart_data import ChartDataResultFormat, ChartDataResultType
  from superset.common.query_context import QueryContext
  from superset.common.query_context_factory import QueryContextFactory
  from superset.common.query_object import QueryObject
  from superset.connectors.sqla.models import SqlMetric
  from superset.daos.datasource import DatasourceDAO
  from superset.extensions import cache_manager
  from superset.superset_typing import AdhocColumn
  from superset.utils.core import AdhocMetricExpressionType, backend, DatasourceType, QueryStatus
  from superset.utils.pandas_postprocessing.utils import FLAT_COLUMN_SEPARATOR
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.conftest import only_postgresql, only_sqlite
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.query_context import get_query_context
label_desc: Use image node_id 3 for calling the TestQueryContext obj's underlying member method code with example usage: obj.test_query_cache_key_changes_when_datasource_is_updated() without return types