code: def try_import(package, message=None):
      """Try import specified package, with custom message support.
  
      Parameters
      ----------
      package : str
          The name of the targeting package.
      message : str, default is None
          If not None, this function will raise customized error message when import error is found.
  
  
      Returns
      -------
      module if found, raise ImportError otherwise
  
      """
      try:
          return __import__(package)
      except ImportError as e:
          if not message:
              raise e
          raise ImportError(message)
  
imports: import os
  import logging
  import numpy
  from PIL import Image
  import torch
  from ..structures import BitMasks, Boxes, BoxMode, Instances, Keypoints, PolygonMasks, polygons_to_bitmask
  from ..transforms import instance_transforms
  from ..registry.catalog import MetadataCatalog
label_desc: Use image node_id 1 for calling a global function with example usage: try_import(package, message) and returns: __import__