code: def remove_temp_dirpath(dirpath, strategy):
      """Removes the temp path after writing is finished.
  
      Args:
        dirpath: Original dirpath that would be used without distribution.
        strategy: The tf.distribute strategy object currently used.
      """
      if strategy is None:
          # Infer strategy from `distribute_lib` if not given.
          strategy = distribute_lib.get_strategy()
      if strategy is None:
          # If strategy is still not available, this is not in distributed training.
          # Fallback to no-op.
          return
      # TODO(anjalisridhar): Consider removing the check for multi worker mode since
      # it is redundant when used with the should_checkpoint property.
      if (
          strategy.extended._in_multi_worker_mode()
          and not strategy.extended.should_checkpoint  # pylint: disable=protected-access
      ):
          # If this worker is not chief and hence should not save file, remove
          # the temporary directory.
          file_io.delete_recursively(_get_temp_dir(dirpath, strategy))
  
file_path: tensorflow-upstream/tensorflow/python/keras/distribute/distributed_file_utils.py
imports: import os
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.lib.io import file_io
label_desc: Use image node_id 5 for calling a global function with example usage: remove_temp_dirpath(dirpath, strategy) without return types