class_docstr: A context manager to enable logging of memory consumption in
  :class:`~torch.utils.data.DataLoader` workers.
code: def enable_memory_log(self) -> None:
      self._old_worker_init_fn = WorkerInitWrapper(self.worker_init_fn)
      try:
          self.worker_init_fn = self._mem_init_fn
          yield
      finally:
          self.worker_init_fn = self._old_worker_init_fn
  
imports: import glob
  import logging
  import os
  import os.path
  import warnings
  from contextlib import contextmanager
  from typing import Any, Callable, Dict, List, Optional, Union
  import psutil
  import torch
  from torch_geometric.data import HeteroData
label_desc: Use image node_id 2 for calling the LogMemoryMixin obj's underlying member method code with example usage: obj.enable_memory_log() without return types