code: def is_timing_close(
      timings_torch, timings_fabric, rtol=1e-2, atol=0.1
  ):
      # Drop measurements of the first iterations, as they may be slower than others
      # The median is more robust to outliers than the mean
      # Given relative and absolute tolerances, we want to satisfy: |torch – fabric| < RTOL * torch + ATOL
      return bool(
          torch.isclose(
              torch.median(timings_torch[3:]),
              torch.median(timings_fabric[3:]),
              rtol=rtol,
              atol=atol,
          )
      )
  
file_path: pytorch-lightning/tests/parity_fabric/utils.py
imports: import os
  import torch
  from lightning.fabric.accelerators.cuda import _clear_cuda_memory
label_desc: Use image node_id 2 for calling a global function with example usage: is_timing_close(timings_torch, timings_fabric, rtol, atol) and returns: bool