class_docstr: A context manager to enable logging of memory consumption in
  :class:`~torch.utils.data.DataLoader` workers.
code: def _mem_init_fn(self, worker_id: int) -> None:
      proc = psutil.Process(os.getpid())
      memory = proc.memory_info().rss / (1024 * 1024)
      logging.debug(
          f"Worker {worker_id} @ PID {proc.pid}: {memory:.2f} MB"
      )
  
      # Chain worker init functions:
      self._old_worker_init_fn(worker_id)
  
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 1 for calling the LogMemoryMixin obj's underlying member method code with example usage: obj._mem_init_fn(worker_id) without return types