code: def _default_transforms(image_key, label_key, pixdim):
      keys = (
          [image_key] if label_key is None else [image_key, label_key]
      )
      mode = (
          [GridSampleMode.BILINEAR, GridSampleMode.NEAREST]
          if len(keys) == 2
          else [GridSampleMode.BILINEAR]
      )
      return Compose(
          [
              LoadImaged(keys=keys),
              EnsureChannelFirstd(keys=keys),
              Orientationd(keys=keys, axcodes="RAS"),
              Spacingd(keys=keys, pixdim=pixdim, mode=mode),
              SqueezeDimd(keys=keys),
          ]
      )
  
file_path: MONAI/monai/apps/deepgrow/dataset.py
imports: from __future__ import annotations
  import logging
  import os
  from collections.abc import Sequence
  import numpy
  from monai.config import PathLike
  from monai.transforms import Compose, EnsureChannelFirstd, LoadImaged, Orientationd, Spacingd, SqueezeDimd, Transform
  from monai.utils import GridSampleMode
label_desc: Use image node_id 2 for calling a global function with example usage: _default_transforms(image_key, label_key, pixdim) and returns: Compose