code: def probe(self, publish: bool = True) -> None:
      logger.info("Collecting system info")
      # collect static info about the hardware from registered assets
      hardware_info: dict = {
          k: v
          for d in [asset.probe() for asset in self.assets]
          for k, v in d.items()
      }
      # collect static info about the software environment
      software_info: dict = self.system_info.probe()
      # merge the two dictionaries
      system_info = {**software_info, **hardware_info}
      logger.debug(system_info)
      logger.info("Finished collecting system info")
  
      if publish:
          logger.info("Publishing system info")
          self.system_info.publish(system_info)
          logger.info("Finished publishing system info")
  
imports: import datetime
  import logging
  import queue
  import threading
  from collections import defaultdict, deque
  from typing import TYPE_CHECKING, Deque, Dict, List, Optional, Tuple
  from .assets.asset_registry import asset_registry
  from .assets.interfaces import Asset, Interface
  from .assets.open_metrics import OpenMetrics
  from .system_info import SystemInfo
label_desc: Use image node_id 9 for calling the SystemMonitor obj's underlying member method code with example usage: obj.probe(publish) without return types