code: def test_memory_limit():
      limit = memory_limit()
      assert isinstance(limit, int)
      assert limit <= psutil.virtual_memory().total
      assert limit >= 1
  
file_path: distributed/distributed/tests/test_system.py
imports: from __future__ import annotations
  import builtins
  import io
  import sys
  import psutil
  import pytest
  from distributed.compatibility import MACOS
  from distributed.system import memory_limit
label_desc: Use image node_id 1 for calling a global function with example usage: test_memory_limit() without return types