code: def collect_all(mod, num_of_gpu):
      """
      Collect all system metrics.
  
      :param mod:
      :param num_of_gpu:
      :return:
      """
  
      members = dir(mod)
      for i in members:
          value = getattr(mod, i)
          if isinstance(
              value, types.FunctionType
          ) and value.__name__ not in (
              "collect_all",
              "log_msg",
          ):
              if value.__name__ == "gpu_utilization":
                  value(num_of_gpu)
              else:
                  value()
  
      for met in system_metrics:
          logging.info(str(met))
  
      logging.info("")
  
file_path: serve/ts/metrics/system_metrics.py
imports: import logging
  import types
  from builtins import str
  import psutil
  from ts.metrics.dimension import Dimension
  from ts.metrics.metric import Metric
label_desc: Use image node_id 9 for calling a global function with example usage: collect_all(mod, num_of_gpu) without return types