code: def log_torch_version(logger):
      try:
          from torch import __version__, __file__
  
          info = f"PyTorch: {__version__} ({__file__})"
      except ImportError:
          info = "PyTorch unavailable"
      logger.info(info)
  
imports: import logging
  import logging.config
  import sys
  from typing import Optional
label_desc: Use image node_id 3 for calling a global function with example usage: log_torch_version(logger) without return types