code: def _dict_append(in_dict, key, fn):
      try:
          in_dict[key] = fn() if callable(fn) else fn
      except BaseException:
          in_dict[key] = "UNKNOWN for given OS"
  
imports: from __future__ import annotations
  import getpass
  import os
  import platform
  import re
  import sys
  from collections import OrderedDict
  from typing import TextIO
  import numpy
  import torch
  import monai
  from monai.utils.module import OptionalImportError, get_package_version, optional_import
label_desc: Use image node_id 4 for calling a global function with example usage: _dict_append(in_dict, key, fn) without return types