code: def gather_machine_configuration():
      """Gather Machine Configuration.  This is the top level fn of this library."""
      config = test_log_pb2.MachineConfiguration()
  
      config.cpu_info.CopyFrom(gather_cpu_info())
      config.platform_info.CopyFrom(gather_platform_info())
  
      # gather_available_device_info must come before gather_gpu_devices
      # because the latter may access libcudart directly, which confuses
      # TensorFlow StreamExecutor.
      for d in gather_available_device_info():
          config.available_device_info.add().CopyFrom(d)
      for gpu in gpu_info_lib.gather_gpu_devices():
          config.device_info.add().Pack(gpu)
  
      config.memory_info.CopyFrom(gather_memory_info())
  
      config.hostname = gather_hostname()
  
      return config
  
file_path: tensorflow-upstream/tensorflow/tools/test/system_info_lib.py
imports: import glob
  import multiprocessing
  import platform
  import re
  import socket
  import cpuinfo
  import psutil
  from tensorflow.core.util import test_log_pb2
  from tensorflow.python.client import device_lib
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import gfile
  from tensorflow.tools.test import gpu_info_lib
label_desc: Use image node_id 1 for calling a global function with example usage: gather_machine_configuration() and returns: config