code: def main():
      pargs = _parse_args()
  
      # Resolve compute config
      compute_config_kwargs = {}
      if pargs.compute_config:
          with open(pargs.compute_config, "r") as f:
              compute_config = yaml.safe_load(f)
          compute_config.update(
              {
                  "cloud_id": os.environ["ANYSCALE_CLOUD_ID"],
              }
          )
          compute_config_kwargs.update(compute_config=compute_config)
  
      # Resolve cluster env config
      cluster_env_config_kwargs = {}
      if pargs.cluster_env_build_id:
          cluster_env_config_kwargs.update(
              build_id=pargs.cluster_env_build_id
          )
  
      base_cmd = f"chmod +x ./run_llama_ft.sh && ./run_llama_ft.sh --size={pargs.size}"
      job_config = {
          "name": f"llama-2-{pargs.size}",
          "entrypoint": base_cmd
          + (" --as-test" if pargs.as_test else ""),
          "max_retries": pargs.max_retries,
          **compute_config_kwargs,
          **cluster_env_config_kwargs,
      }
  
      pathlib.Path(os.path.dirname(pargs.output_path)).mkdir(
          parents=True, exist_ok=True
      )
      with open(pargs.output_path, "w") as f:
          yaml.safe_dump(job_config, f)
      print("Job config written to ", pargs.output_path)
      print("To submit the job, run:")
      print(f"anyscale job submit {pargs.output_path}")
  
imports: from argparse import ArgumentParser
  import yaml
  import os
  import pathlib
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types