code: def test_run_query_throw_runtime_error(
      sagemaker_session_mock, feature_group_mock
  ):
      dataset_builder = DatasetBuilder(
          sagemaker_session=sagemaker_session_mock,
          base=feature_group_mock,
          output_path="file/to/path",
      )
      sagemaker_session_mock.start_query_execution.return_value = {
          "QueryExecutionId": "query-id"
      }
      sagemaker_session_mock.get_query_execution.return_value = {
          "QueryExecution": {"Status": {"State": "FAILED"}}
      }
      with pytest.raises(RuntimeError) as error:
          dataset_builder._run_query(
              "query-string", "catalog", "database"
          )
      assert "Failed to execute query query-id." in str(error)
  
imports: from __future__ import absolute_import
  import datetime
  import pandas
  import pytest
  import os
  from mock import Mock, patch
  from sagemaker.feature_store.dataset_builder import DatasetBuilder, FeatureGroupToBeMerged, TableType, JoinComparatorEnum, JoinTypeEnum
  from sagemaker.feature_store.feature_group import FeatureDefinition, FeatureGroup, FeatureTypeEnum
label_desc: Use image node_id 25 for calling a global function with example usage: test_run_query_throw_runtime_error(sagemaker_session_mock, feature_group_mock) without return types