code: def reset_classifier(self, num_classes, global_pool="avg"):
      self.global_pool = SelectAdaptivePool2d(pool_type=global_pool)
      self.num_classes = num_classes
      self.classifier = (
          nn.Linear(
              self.num_features * self.global_pool.feat_mult(),
              num_classes,
          )
          if self.num_classes
          else None
      )
  
file_path: nni/examples/nas/legacy/cream/lib/models/structures/childnet.py
imports: from lib.utils.builder_util import *
  from lib.models.builders.build_childnet import *
  from timm.models.layers import SelectAdaptivePool2d
  from timm.models.layers.activations import hard_sigmoid
label_desc: Use image node_id 3 for calling the ChildNet obj's underlying member method code with example usage: obj.reset_classifier(num_classes, global_pool) without return types