code: def pascal_job(
      partition: str, timeout_min: int, node: str = ""
  ) -> Job:
      """Submit a job with specific constraint that we can preempt deterministically."""
      ex = submitit.AutoExecutor(folder=LOGS, slurm_max_num_timeout=1)
      ex.update_parameters(
          name=f"submitit_preemption_{partition}",
          timeout_min=timeout_min,
          mem_gb=7,
          slurm_constraint="pascal",
          slurm_comment="submitit integration test",
          slurm_partition=partition,
          slurm_mail_type="REQUEUE,BEGIN",
          slurm_mail_user=f"{getpass.getuser()}+slurm@meta.com",
          # pascal nodes have 80 cpus.
          # By requesting 50 we now that their can be only one such job with this property.
          cpus_per_task=50,
          slurm_additional_parameters={},
      )
      if node:
          ex.update_parameters(nodelist=node)
  
      return ex.submit(clock, partition, timeout_min)
  
file_path: submitit/integration/preemption.py
imports: import getpass
  import logging
  import shutil
  import subprocess
  import time
  from datetime import datetime
  from pathlib import Path
  import submitit
  from submitit import AutoExecutor, Job
  from submitit.core import test_core
label_desc: Use image node_id 2 for calling a global function with example usage: pascal_job(partition, timeout_min, node) and returns: ex