code: def get_shared(virtual_memory):
      """Get the estimated shared memory usage from psutil virtual mem info."""
      # OSX doesn't have the shared attribute
      if hasattr(virtual_memory, "shared"):
          return virtual_memory.shared
      else:
          return 0
  
file_path: ray/python/ray/_private/memory_monitor.py
imports: import logging
  import os
  import platform
  import sys
  import time
  import ray
  import psutil
label_desc: Use image node_id 2 for calling a global function with example usage: get_shared(virtual_memory) and returns: virtual_memory, int