code: def try_import_pycocotools():
      """Tricks to optionally install and import pycocotools"""
      # first we can try import pycocotools
      try:
          import pycocotools as _
      except ImportError:
          # we need to install pycootools, which is a bit tricky
          # pycocotools sdist requires Cython, numpy(already met)
          import_try_install("cython")
          # pypi pycocotools is not compatible with windows
          win_url = "git+https://github.com/zhreshold/cocoapi.git#subdirectory=PythonAPI"
          try:
              if os.name == "nt":
                  import_try_install("pycocotools", win_url)
              else:
                  import_try_install("pycocotools")
          except ImportError:
              faq = "cocoapi FAQ"
              raise ImportError(
                  "Cannot import or install pycocotools, please refer to %s."
                  % faq
              )
  
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 3 for calling a global function with example usage: try_import_pycocotools() without return types