hunk.code_window:     print_format_output(info_df)
   def add_note(path, filename="note.txt"):
       """Opens a txt file at the given path where user can add and save notes.
       Args:
  
hunk.labels: keep keep add keep keep keep keep keep
hunk.after_edit:     if output:
           output_path = os.path.join(base, output)
           file_extension = os.path.splitext(output)[1].lower()
           if file_extension in (".p", ".pkl", ".pickle"):
               info_df.to_pickle(output_path)
           elif file_extension == ".csv":
               info_df.to_csv(output_path, index=False)
           else:
               raise ValueError("Unsupported filetype: {}".format(output))
           print("Output saved at:", output_path)
  
hunk.file_path: python/ray/tune/commands.py
hunk.type: add
file: package org.ray.runtime;
  
  import com.google.common.base.Preconditions;
  import org.ray.api.RuntimeContext;
  import org.ray.api.id.UniqueId;
  import org.ray.runtime.config.RunMode;
  import org.ray.runtime.task.TaskSpec;
  
  public class RuntimeContextImpl implements RuntimeContext {
  
    private AbstractRayRuntime runtime;
  
    public RuntimeContextImpl(AbstractRayRuntime runtime) {
      this.runtime = runtime;
    }
  
    @Override
    public UniqueId getCurrentDriverId() {
      return runtime.getWorkerContext().getCurrentDriverId();
    }
  
    @Override
    public UniqueId getCurrentActorId() {
      Worker worker = runtime.getWorker();
      Preconditions.checkState(worker != null && !worker.getCurrentActorId().isNil(),
          "This method should only be called from an actor.");
      return worker.getCurrentActorId();
    }
  
    @Override
    public boolean wasCurrentActorReconstructed() {
      TaskSpec currentTask = runtime.getWorkerContext().getCurrentTask();
      Preconditions.checkState(currentTask != null && currentTask.isActorCreationTask(),
          "This method can only be called from an actor creation task.");
      if (isSingleProcess()) {
        return false;
      }
  
      return ((RayNativeRuntime) runtime).actorExistsInGcs(getCurrentActorId());
    }
  
    @Override
    public String getRayletSocketName() {
      return runtime.getRayConfig().rayletSocketName;
    }
  
    @Override
    public String getObjectStoreSocketName() {
      return runtime.getRayConfig().objectStoreSocketName;
    }
  
    @Override
    public boolean isSingleProcess() {
      return RunMode.SINGLE_PROCESS == runtime.getRayConfig().runMode;
    }
  
  }
  