code: def _log_pending_info(
      transform: Any,
      data: Any,
      activity: str,
      *,
      lazy: bool | None = None,
      key: str | None = None,
      logger_name: bool | str = False,
  ):
      if logger_name is False:
          return
      logger_name = (
          logger_name
          if isinstance(logger_name, str)
          else "apply_pending_transforms"
      )
      logger = get_logger(logger_name)
  
      tcname = type(transform).__name__
      if isinstance(transform, LazyTrait):
          tlazy = f", transform.lazy: {transform.lazy}"
          if lazy is not None and lazy != transform.lazy:
              tlazy += " (overridden)"
      else:
          tlazy = ", transform is not lazy"
  
      msg = f"{activity} - lazy: {lazy}, {{key_msg}}pending: {{pcount}}, upcoming '{tcname}'{tlazy}"
  
      if isinstance(transform, MapTransform):
          transform_keys = transform.keys if key is None else (key,)
          for k in transform_keys:
              if k in data:
                  pcount = (
                      len(data[k].pending_operations)
                      if isinstance(data[k], MetaTensor)
                      else 0
                  )
                  logger.info(
                      msg.format(pcount=pcount, key_msg=f"key: '{k}', ")
                  )
      else:
          pcount = (
              len(data.pending_operations)
              if isinstance(data, MetaTensor)
              else 0
          )
          logger.info(
              msg.format(
                  pcount=pcount,
                  key_msg="" if key is None else f"key: '{key}', ",
              )
          )
  
file_path: MONAI/monai/transforms/lazy/functional.py
imports: from __future__ import annotations
  from typing import Any, Mapping, Sequence
  import torch
  from monai.apps.utils import get_logger
  from monai.config import NdarrayOrTensor
  from monai.data.meta_tensor import MetaTensor
  from monai.data.utils import to_affine_nd
  from monai.transforms.lazy.utils import affine_from_pending, combine_transforms, is_compatible_apply_kwargs, kwargs_from_pending, resample
  from monai.transforms.traits import LazyTrait
  from monai.transforms.transform import MapTransform
  from monai.utils import LazyAttr, look_up_option
label_desc: Use image node_id 1 for calling a global function with example usage: _log_pending_info(transform, data, activity) without return types