class_docstr: Abstract TFX executor class.
class_docstr_tok: ["Abstract","TFX","executor","class","."]
docstr: Get the temporary directory path.
docstr_tok: ["Get","the","temporary","directory","path","."]
code: def _get_tmp_dir(self) -> str:
      """Get the temporary directory path."""
      if not self._context:
          raise RuntimeError("No context for the executor")
      tmp_path = self._context.get_tmp_path()
      if not fileio.exists(tmp_path):
          logging.info("Creating temp directory at %s", tmp_path)
          fileio.makedirs(tmp_path)
      return tmp_path
  
file_path: tfx/tfx/dsl/components/base/base_executor.py
imports: import abc
  import os
  from typing import Any, Dict, List, Optional
  from absl import logging
  from tfx import types
  from tfx.dsl.io import fileio
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import pipeline_pb2
label_desc: Use image node_id 3 for calling the BaseExecutor obj's underlying member method code with example usage: obj._get_tmp_dir() and returns: tmp_path