code: def test_maxlen_zero():
      """maxlen is floored to 1 otherwise recent() would not work"""
      sm = SystemMonitor(maxlen=0)
      sm.update()
      sm.update()
      assert len(sm.quantities["memory"]) == 1
      assert sm.recent()["memory"] == sm.quantities["memory"][-1]
  
file_path: distributed/distributed/tests/test_system_monitor.py
imports: from __future__ import annotations
  from time import sleep
  import pytest
  import dask
  from distributed.system_monitor import SystemMonitor
label_desc: Use image node_id 2 for calling a global function with example usage: test_maxlen_zero() without return types