code: def test_trainer_dataframe():
      session = create_sagemaker_session(
          describe_training_result=_describe_training_result(),
          metric_stats_results=_metric_stats_results(),
      )
      trainer = TrainingJobAnalytics(
          "my-training-job", ["train:acc"], sagemaker_session=session
      )
  
      df = trainer.dataframe()
      assert df is not None
      assert len(df) == 3
      assert min(df["value"]) == 77.1
      assert max(df["value"]) == 97.1
  
      # Export to CSV and check that file exists
      tmp_name = "/tmp/unit-test-%s.csv" % uuid.uuid4()
      assert not os.path.isfile(tmp_name)
      trainer.export_csv(tmp_name)
      assert os.path.isfile(tmp_name)
      os.unlink(tmp_name)
  
imports: from __future__ import absolute_import
  import datetime
  import os
  import uuid
  import pytest
  from mock import Mock
  from sagemaker.analytics import AnalyticsMetricsBase, HyperparameterTuningJobAnalytics, TrainingJobAnalytics
  from sagemaker.session_settings import SessionSettings
label_desc: Use image node_id 14 for calling a global function with example usage: test_trainer_dataframe() without return types