code: def measure_rss_deltas(
      rss_deltas: List[int],
      interval: timedelta = _DEFAULT_MEASURE_INTERVAL,
  ) -> Generator[None, None, None]:
      """
      A context manager that periodically measures RSS (resident set size) delta.
  
      The baseline RSS is measured when the context manager is initialized.
  
      Args:
          rss_deltas: The list to which the measured RSS deltas (measured in
              bytes) are appended.
          interval: The interval at which RSS deltas are measured.
      """
      thread, stop_event = _get_target_thread(rss_deltas, interval)
      thread.start()
      try:
          yield
      finally:
          stop_event.set()
          thread.join()
  
file_path: tnt/torchtnt/utils/memory.py
imports: import time
  from collections import deque
  from contextlib import contextmanager
  from datetime import timedelta
  from enum import Enum
  from threading import Event, Thread
  from typing import Any, Dict, Generator, List, Mapping, Sequence, Tuple
  import psutil
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: measure_rss_deltas(rss_deltas, interval) without return types