code: def do_structure(cfg):
      if isinstance(cfg, CfgNode):
          model = build_model(cfg)
      else:
          model = instantiate(cfg.model)
      logger.info("Model Structure:\n" + str(model))
  
file_path: detectron2/tools/analyze_model.py
imports: import logging
  import numpy
  from collections import Counter
  import tqdm
  from fvcore.nn import flop_count_table
  from detectron2.checkpoint import DetectionCheckpointer
  from detectron2.config import CfgNode, LazyConfig, get_cfg, instantiate
  from detectron2.data import build_detection_test_loader
  from detectron2.engine import default_argument_parser
  from detectron2.modeling import build_model
  from detectron2.utils.analysis import FlopCountAnalysis, activation_count_operators, parameter_count_table
  from detectron2.utils.logger import setup_logger
label_desc: Use image node_id 5 for calling a global function with example usage: do_structure(cfg) without return types