code: def set_rnd(obj, seed: int) -> int:
      """
      Set seed or random state for all randomizable properties of obj.
  
      Args:
          obj: object to set seed or random state for.
          seed: set the random state with an integer seed.
      """
      if isinstance(obj, (tuple, list)):  # ZipDataset.data is a list
          _seed = seed
          for item in obj:
              _seed = set_rnd(item, seed=seed)
          return (
              seed if _seed == seed else seed + 1
          )  # return a different seed if there are randomizable items
      if not hasattr(obj, "__dict__"):
          return seed  # no attribute
      if hasattr(obj, "set_random_state"):
          obj.set_random_state(seed=seed % MAX_SEED)
          return seed + 1  # a different seed for the next component
      for key in obj.__dict__:
          if key.startswith("__"):  # skip the private methods
              continue
          seed = set_rnd(obj.__dict__[key], seed=seed)
      return seed
  
imports: from __future__ import annotations
  import hashlib
  import json
  import logging
  import math
  import os
  import pickle
  import sys
  from collections import abc, defaultdict
  from collections.abc import Generator, Iterable, Mapping, Sequence, Sized
  from copy import deepcopy
  from functools import reduce
  from itertools import product, starmap, zip_longest
  from pathlib import PurePath
  from typing import Any
  import numpy
  import torch
  from torch.utils.data._utils.collate import default_collate
  from monai import config
  from monai.config.type_definitions import NdarrayOrTensor, NdarrayTensor, PathLike
  from monai.data.meta_obj import MetaObj
  from monai.utils import MAX_SEED, BlendMode, Method, NumpyPadMode, TraceKeys, convert_data_type, convert_to_dst_type, ensure_tuple, ensure_tuple_rep, ensure_tuple_size, fall_back_tuple, first, get_equivalent_dtype, issequenceiterable, look_up_option, optional_import, pytorch_after
label_desc: Use image node_id 17 for calling a global function with example usage: set_rnd(obj, seed) and returns: seed, unknown, seed, unknown