code: def kwargs_from_pending(pending_item):
      """Extract kwargs from a pending transform item."""
      if not isinstance(pending_item, dict):
          return {}
      ret = {
          LazyAttr.INTERP_MODE: pending_item.get(
              LazyAttr.INTERP_MODE, None
          ),  # interpolation mode
          LazyAttr.PADDING_MODE: pending_item.get(
              LazyAttr.PADDING_MODE, None
          ),  # padding mode
      }
      if LazyAttr.SHAPE in pending_item:
          ret[LazyAttr.SHAPE] = pending_item[LazyAttr.SHAPE]
      if LazyAttr.DTYPE in pending_item:
          ret[LazyAttr.DTYPE] = pending_item[LazyAttr.DTYPE]
      return ret
  
imports: from __future__ import annotations
  import warnings
  import numpy
  import torch
  import monai
  from monai.config import NdarrayOrTensor
  from monai.data.utils import AFFINE_TOL
  from monai.transforms.utils_pytorch_numpy_unification import allclose
  from monai.utils import LazyAttr, convert_to_numpy, convert_to_tensor, look_up_option
label_desc: Use image node_id 3 for calling a global function with example usage: kwargs_from_pending(pending_item) and returns: ret, dict