class_docstr: An implementation of functionality for lazy transforms that can be subclassed by array and
  dictionary transforms to simplify implementation of new lazy transforms.
class_docstr_tok: ["An","implementation","of","functionality","for","lazy","transforms","that","can","be","subclassed","by","array","and","dictionary","transforms","to","simplify","implementation","of","new","lazy","transforms","."]
code: def lazy(self, lazy: bool | None):
      if lazy is not None:
          if not isinstance(lazy, bool):
              raise TypeError(
                  f"lazy must be a bool but is of type {type(lazy)}"
              )
      self._lazy = lazy
  
imports: from __future__ import annotations
  import logging
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Generator, Hashable, Iterable, Mapping
  from typing import Any, TypeVar
  import numpy
  import torch
  from monai import config, transforms
  from monai.config import KeysCollection
  from monai.data.meta_tensor import MetaTensor
  from monai.transforms.traits import LazyTrait, RandomizableTrait, ThreadUnsafe
  from monai.utils import MAX_SEED, ensure_tuple, first
  from monai.utils.enums import TransformBackends
  from monai.utils.misc import MONAIEnvVars
label_desc: Use image node_id 3 for calling the LazyTransform obj's underlying member method code with example usage: obj.lazy(lazy) without return types