code: def handle_deprecated_job_keys(i, job):
      if "pvc_size" in job:
          if "resources" in job and "storage" in job["resources"]:
              raise ValidationError(
                  f"jobs[{i}].resources.storage is already defined, but "
                  f"deprecated key 'pvc_size' is also present."
              )
          pvc_size = job["pvc_size"]
          try:
              job_validator["resources"]["storage"].validate(
                  f"jobs[{i}].pvc_size", job["pvc_size"]
              )
          except ValidationError as e:
              raise ValidationError(
                  f"[pvc_size key is DEPRECATED. Use "
                  f"resources.storage] {e.reason}"
              ) from e
          resources = job.get("resources")
          if resources is None:
              resources = {}
              job["resources"] = resources
          resources["storage"] = pvc_size
          del job["pvc_size"]
  
      if "process" not in job:
          process_keys = ["command", "image"]
          if "command" not in job or "image" not in job:
              raise ValidationError(
                  f"jobs[{i}].process is not defined, but "
                  f"deprecated keys {[k for k in process_keys if k not in job]} "
                  f"are not in jobs[{i}]"
              )
          command = job["command"]
          image = job["image"]
          try:
              for k in process_keys:
                  job_validator["process"]["docker"][k].validate(
                      f"jobs[{i}].{k}", job[k]
                  )
          except ValidationError as e:
              raise ValidationError(
                  f"[command, image keys are "
                  f"DEPRECATED. Use process.command, process.image, "
                  f"with process.type = 'docker'.] "
                  f"{e.reason}"
              ) from e
  
          job["process"] = {
              "command": command,
              "image": image,
              "type": "docker",
          }
          del job["command"]
          del job["image"]
      elif "command" in job or "image" in job:
          raise ValidationError(
              f"jobs[{i}].process is already defined, but "
              f"deprecated keys 'command', 'image' "
              f"are also present. "
              f"Please remove deprecated keys."
          )
  
      mount_docker_socket = job["process"].pop(
          "mount_docker_socket", False
      )
      if mount_docker_socket:
          raise ValidationError(
              "mount_docker_socket is no longer supported but was set to True in request. Please upgrade."
          )
  
      if "gcsfuse" in job:
          job["cloudfuse"] = job.pop("gcsfuse")
  
imports: from hailtop.batch_client.parse import CPU_REGEX, CPU_REGEXPAT, MEMORY_REGEX, MEMORY_REGEXPAT, STORAGE_REGEX, STORAGE_REGEXPAT
  from hailtop.utils.validate import ValidationError, anyof, bool_type, dictof, int_type, keyed, listof, non_empty_str_type, nullable, numeric, oneof, regex, required, str_type, switch
  from ..globals import memory_types
label_desc: Use image node_id 2 for calling a global function with example usage: handle_deprecated_job_keys(i, job) without return types