code: def my_app(cfg: DictConfig) -> str:
      def pickle_cfg(path: Path, obj: Any) -> Any:
          with open(str(path), "wb") as file:
              pickle.dump(obj, file)
  
      hydra_cfg = HydraConfig.get()
      output_dir = Path(hydra_cfg.runtime.output_dir)
      pickle_cfg(Path(output_dir) / "task_cfg.pickle", cfg)
      pickle_cfg(Path(output_dir) / "hydra_cfg.pickle", hydra_cfg)
      log.info("Running my_app")
  
      return "hello world"
  
file_path: hydra/tests/test_apps/app_with_pickle_job_info_callback/my_app.py
imports: import logging
  import pickle
  from pathlib import Path
  from typing import Any
  from omegaconf import DictConfig
  import hydra
  from hydra.core.hydra_config import HydraConfig
label_desc: Use image node_id 1 for calling a global function with example usage: my_app(cfg) and returns: str