code: def test_to_csv_file_with_feature_group(sagemaker_session_mock):
      feature_group = FeatureGroup(
          name="MyFeatureGroup",
          sagemaker_session=sagemaker_session_mock,
      )
      dataset_builder = DatasetBuilder(
          sagemaker_session=sagemaker_session_mock,
          base=feature_group,
          output_path="file/to/path",
      )
      sagemaker_session_mock.describe_feature_group.return_value = {
          "OfflineStoreConfig": {
              "DataCatalogConfig": {
                  "TableName": "table",
                  "Database": "database",
              }
          },
          "RecordIdentifierFeatureName": "feature-1",
          "EventTimeFeatureName": "feature-2",
          "FeatureDefinitions": [
              {"FeatureName": "feature-1", "FeatureType": "String"},
              {"FeatureName": "feature-2", "FeatureType": "String"},
          ],
      }
      sagemaker_session_mock.start_query_execution.return_value = {
          "QueryExecutionId": "query-id"
      }
      sagemaker_session_mock.get_query_execution.return_value = {
          "QueryExecution": {
              "Status": {"State": "SUCCEEDED"},
              "ResultConfiguration": {"OutputLocation": "s3-file-path"},
              "Query": "query-string",
          }
      }
      file_path, query_string = dataset_builder.to_csv_file()
      assert file_path == "s3-file-path"
      assert query_string == "query-string"
  
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 16 for calling a global function with example usage: test_to_csv_file_with_feature_group(sagemaker_session_mock) without return types