code: def lookup_mmdet_config(key, config):
      if key in config:
          return config[key]
      for subconfig in config.values():
          if isinstance(subconfig, dict):
              result = lookup_mmdet_config(key, subconfig)
              if result is not None:
                  return result
          elif isinstance(subconfig, list):
              for subsubconfig in subconfig:
                  if isinstance(subsubconfig, dict):
                      result = lookup_mmdet_config(key, subsubconfig)
                      if result is not None:
                          return result
      return None
  
imports: import logging
  import re
  import warnings
  from typing import Dict, List, Optional, Tuple
  import torch
  import torch._dynamo
  import torch.nn.functional
  from torch import nn
  from torch.nn.modules.loss import _Loss
  from transformers import AutoConfig, AutoModel, AutoTokenizer, BertTokenizer, CLIPTokenizer, ElectraTokenizer
  from transformers.models.mask2former.modeling_mask2former import Mask2FormerLoss
  from ..constants import AUTOMM, CLASS_LOGITS, COLUMN_FEATURES, FEATURES, LOGITS, MASKS, OCR, PEFT_ADDITIVE_STRATEGIES, REGRESSION, SEMANTIC_MASK, SEMANTIC_SEGMENTATION
  from .adaptation_layers import IA3Linear, IA3LoRALinear, LoRALinear
label_desc: Use image node_id 17 for calling a global function with example usage: lookup_mmdet_config(key, config) and returns: None, config, result, result