code: def init_logger(self, name=LOGGER_NAME):
      stream = StringIO()
      handler = logging.StreamHandler(stream)
      formatter = logging.Formatter("%(levelname)s - %(message)s")
      handler.setFormatter(formatter)
      logger = logging.getLogger(name)
      logger.setLevel(logging.INFO)
      while len(logger.handlers) > 0:
          logger.removeHandler(logger.handlers[-1])
      logger.addHandler(handler)
      return handler, stream
  
imports: from __future__ import annotations
  import logging
  import os
  import tempfile
  import unittest
  from copy import deepcopy
  from io import StringIO
  import nibabel
  import numpy
  from parameterized import parameterized
  from monai.data import Dataset
  from monai.transforms import Compose, LoadImaged, SimulateDelayd
  from tests.test_compose import TEST_COMPOSE_LAZY_ON_CALL_LOGGING_TEST_CASES, data_from_keys
label_desc: Use image node_id 1 for calling the TestDatsesetWithLazy obj's underlying member method code with example usage: obj.init_logger(name) and returns: handler,  stream