code: def print_device_info(device=None):
      """Prints device stats. Code from https://stackoverflow.com/a/53374933/12891528"""
      device = torch.device(
          device or ("cuda" if torch.cuda.is_available() else "cpu")
      )
      logger.info(f"Using device: {device}")
  
      # Additional Info when using cuda
      if device.type == "cuda":
          logger.info(torch.cuda.get_device_name(0))
          logger.info(f"Memory Usage:")
          logger.info(
              f"Allocated: {round(torch.cuda.memory_allocated(0) / 1024 ** 3, 1)} GB"
          )
          logger.info(
              f"Cached:   {round(torch.cuda.memory_cached(0) / 1024 ** 3, 1)} GB"
          )
  
file_path: hivemind/benchmarks/benchmark_throughput.py
imports: import argparse
  import multiprocessing
  import random
  import sys
  import time
  import torch
  from hivemind.dht import DHT
  from hivemind.moe.client.expert import RemoteExpert
  from hivemind.moe.client.remote_expert_worker import RemoteExpertWorker
  from hivemind.moe.expert_uid import ExpertInfo
  from hivemind.moe.server import ModuleBackend, Server
  from hivemind.moe.server.layers import name_to_block
  from hivemind.p2p import P2P
  from hivemind.utils.limits import increase_file_limit
  from hivemind.utils.logging import get_logger, use_hivemind_log_handler
  from hivemind.utils.tensor_descr import BatchTensorDescriptor
label_desc: Use image node_id 1 for calling a global function with example usage: print_device_info(device) without return types