docstr: Sample process memory, as reported by the OS.
  This one-liner function exists so that it can be easily mocked in unit tests,
  as the OS allocating and releasing memory is highly volatile and a constant
  source of flakiness.
docstr_tok: ["Sample","process","memory",",","as","reported","by","the","OS",".","This","one-liner","function","exists","so","that","it","can","be","easily","mocked","in","unit","tests",",","as","the","OS","allocating","and","releasing","memory","is","highly","volatile","and","a","constant","source","of","flakiness","."]
code: def get_process_memory(self) -> int:
      """Sample process memory, as reported by the OS.
      This one-liner function exists so that it can be easily mocked in unit tests,
      as the OS allocating and releasing memory is highly volatile and a constant
      source of flakiness.
      """
      return self.proc.memory_info().rss
  
file_path: distributed/distributed/system_monitor.py
imports: from __future__ import annotations
  import sys
  from collections import deque
  from typing import Any
  import psutil
  import dask.config
  from dask.typing import NoDefault, no_default
  from dask.utils import parse_timedelta
  from distributed.compatibility import WINDOWS
  from distributed.diagnostics import nvml
  from distributed.metrics import monotonic, time
label_desc: Use image node_id 3 for calling the SystemMonitor obj's underlying member method code with example usage: obj.get_process_memory() and returns: self