code: def startup():
      # read job spec
      with open("/cortex/spec/job.json", "r") as f:
          job_spec = json.load(f)
      print(json.dumps(job_spec, indent=2))
  
      # get metadata
      config = job_spec["config"]
      job_id = job_spec["job_id"]
      if len(config.get("dest_s3_dir", "")) == 0:
          raise Exception(
              "'dest_s3_dir' field was not provided in job submission"
          )
  
      # s3 info
      app.bucket, app.key = re.match(
          "s3://(.+?)/(.+)", config["dest_s3_dir"]
      ).groups()
      app.key = os.path.join(app.key, job_id)
  
      app.ready = True
  
file_path: cortex/test/apis/batch/sum/app/main.py
imports: import os
  import boto3
  import json
  import re
  from typing import List
  from fastapi import FastAPI, status
  from fastapi.responses import PlainTextResponse
label_desc: Use image node_id 1 for calling a global function with example usage: startup() without return types