code: def is_config_valid(cfg, target_flops, input_shape, eps):
      model = build_detector(
          cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg
      )
      if torch.cuda.is_available():
          model.cuda()
      model.eval()
      if hasattr(model, "forward_dummy"):
          model.forward = model.forward_dummy
      else:
          raise NotImplementedError(
              "FLOPs counter is currently not currently supported with {}".format(
                  model.__class__.__name__
              )
          )
      flops, params = get_model_complexity_info(
          model,
          input_shape,
          print_per_layer_stat=False,
          as_strings=False,
      )
      print("FLOPs:", flops / 1e9)
      return (
          flops <= (1.0 + eps) * target_flops
          and flops >= (1.0 - eps) * target_flops
      )
  
imports: import os
  import os.path
  import io
  import numpy
  import argparse
  import datetime
  import importlib
  import configparser
  from tqdm import tqdm
  from mmdet.models import build_detector
  import torch
  import autotorch
  from mmcv import Config
  from mmdet.models import build_detector
label_desc: Use image node_id 2 for calling a global function with example usage: is_config_valid(cfg, target_flops, input_shape, eps) and returns: unknown