code: def update_default_cfg_and_kwargs(default_cfg, kwargs, kwargs_filter):
      """Update the default_cfg and kwargs before passing to model
  
      FIXME this sequence of overlay default_cfg, set default kwargs, filter kwargs
      could/should be replaced by an improved configuration mechanism
  
      Args:
          default_cfg: input default_cfg (updated in-place)
          kwargs: keyword args passed to model build fn (updated in-place)
          kwargs_filter: keyword arg keys that must be removed before model __init__
      """
      # Overlay default cfg values from `external_default_cfg` if it exists in kwargs
      overlay_external_default_cfg(default_cfg, kwargs)
      # Set model __init__ args that can be determined by default_cfg (if not already passed as kwargs)
      default_kwarg_names = ("num_classes", "global_pool", "in_chans")
      if default_cfg.get("fixed_input_size", False):
          # if fixed_input_size exists and is True, model takes an img_size arg that fixes its input size
          default_kwarg_names += ("img_size",)
      set_default_kwargs(
          kwargs, names=default_kwarg_names, default_cfg=default_cfg
      )
      # Filter keyword args for task specific model variants (some 'features only' models, etc.)
      filter_kwargs(kwargs, names=kwargs_filter)
  
imports: import logging
  import os
  import math
  from collections import OrderedDict
  from copy import deepcopy
  from typing import Any, Callable, Optional, Tuple
  import torch
  import torch.nn
  from torch.hub import load_state_dict_from_url
  from timm.models.features import FeatureListNet, FeatureDictNet, FeatureHookNet
  from timm.models.fx_features import FeatureGraphNet
  from timm.models.hub import has_hf_hub, download_cached_file, load_state_dict_from_hf
  from timm.models.layers import Conv2dSame, Linear
  from timm.models.vision_transformer import VisionTransformer, resize_pos_embed
  import tutel.impls.moe_layer
label_desc: Use image node_id 16 for calling a global function with example usage: update_default_cfg_and_kwargs(default_cfg, kwargs, kwargs_filter) without return types