code: def import_custom_op(op_mod, must, op_sub_mod):
      spec = importlib.util.find_spec(op_mod)
      if spec is None:
          logger.warning(
              f"Custom operator {op_mod} is not found. Please check if it is properly installed."
          )
          if not must:
              logger.warning(
                  f"{op_sub_mod} is used instead of {op_mod}."
              )
              importlib.import_module(op_sub_mod)
              return mod
          else:
              raise ImportError
      else:
          mod = importlib.import_module(op_mod)
          return mod
  
file_path: PaddleSeg/contrib/PanopticSeg/paddlepanseg/utils/misc.py
imports: import copy
  import importlib
  from collections.abc import Mapping, Sequence
  from contextlib import contextmanager
  from tabulate import tabulate
  from paddleseg.utils import logger
label_desc: Use image node_id 3 for calling a global function with example usage: import_custom_op(op_mod, must, op_sub_mod) and returns: mod, mod