code: def test_query_has_access(mocker: MockFixture) -> None:
      from superset.explore.utils import check_datasource_access
      from superset.models.sql_lab import Query
  
      mocker.patch(query_find_by_id, return_value=Query())
      mocker.patch(raise_for_access, return_value=True)
      mocker.patch(is_admin, return_value=False)
      mocker.patch(is_owner, return_value=False)
      mocker.patch(can_access, return_value=True)
      assert (
          check_datasource_access(
              datasource_id=1,
              datasource_type=DatasourceType.QUERY,
          )
          == True
      )
  
imports: from flask_appbuilder.security.sqla.models import User
  from pytest import raises
  from pytest_mock import MockFixture
  from superset.commands.chart.exceptions import ChartAccessDeniedError, ChartNotFoundError
  from superset.commands.dataset.exceptions import DatasetAccessDeniedError, DatasetNotFoundError
  from superset.commands.exceptions import DatasourceNotFoundValidationError, DatasourceTypeInvalidError, OwnersNotFoundValidationError, QueryNotFoundValidationError
  from superset.exceptions import SupersetSecurityException
  from superset.utils.core import DatasourceType, override_user
label_desc: Use image node_id 13 for calling a global function with example usage: test_query_has_access(mocker) without return types