class_docstr: The driver to run all sample models in all specified configurations.
class_docstr_tok: ["The","driver","to","run","all","sample","models","in","all","specified","configurations","."]
code: def _write_analysis_result(
      self, df: result_analyzer.DataFrame, path: str
  ) -> None:
      if self._output_format == "CSV":
          df.to_csv(os.path.join(path, "result.csv"))
      elif self._output_format == "JSON":
          df.to_json(os.path.join(path, "result.json"))
      else:
          raise NotImplementedError(
              "Unsupported output format: {}".format(
                  self._output_format
              )
          )
  
imports: import functools
  import os
  import tempfile
  from typing import Callable, Iterable, Sequence
  from collections import namedtuple
  from absl import app
  from absl import flags
  from tensorflow.python.compiler.tensorrt import trt_convert
  from tensorflow.python.compiler.tensorrt.model_tests import model_handler
  from tensorflow.python.compiler.tensorrt.model_tests import result_analyzer
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model import tag_constants
label_desc: Use image node_id 2 for calling the SampleRunner obj's underlying member method code with example usage: obj._write_analysis_result(df, path) without return types