code: def log_gpu_memory_usage(log, msg, device):
      usage, cache, misc = gpu_memory_usage_all(device)
      extras = []
      if cache > 0:
          extras.append(f"+{cache:.03f}GB cache")
      if misc > 0:
          extras.append(f"+{misc:.03f}GB misc")
      log.info(
          f"GPU memory usage {msg}: {usage:.03f}GB ({', '.join(extras)})",
          stacklevel=2,
      )
      return usage, cache, misc
  
file_path: axolotl/src/axolotl/utils/bench.py
imports: import functools
  import pynvml
  import torch
  from pynvml.nvml import NVMLError
label_desc: Use image node_id 5 for calling a global function with example usage: log_gpu_memory_usage(log, msg, device) and returns: usage,  cache,  misc