code: def from_config(cls, config: Dict[str, Any]) -> "ResNeXt":
      config = copy.deepcopy(config)
      config.pop("name")
      if "heads" in config:
          config.pop("heads")
      return cls(**config)
  
imports: import copy
  import math
  import re
  import warnings
  from collections import OrderedDict
  from typing import Any, Dict, Optional, Sequence
  import torch.nn
  from classy_vision.generic.util import is_pos_int, is_pos_int_tuple
  from .None import register_model
  from .classy_model import ClassyModel
  from .squeeze_and_excitation_layer import SqueezeAndExcitationLayer
label_desc: Use image node_id 1 for calling the _ResNeXt obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls