code: def psutil_phymem_usage():
      
      import psutil
      # This is needed to avoid a deprecation warning error with
      # newer psutil versions
      try:
          percent = psutil.virtual_memory().percent
      except:
          percent = psutil.phymem_usage().percent
      return percent
docs: Return physical memory usage (float)
      Requires the cross-platform psutil (>=v0.3) library
      (https://github.com/giampaolo/psutil)