code: def __init__(
      self,
      inplanes,
      planes,
      stride,
      bn_affine=True,
      bn_momentum=0.1,
      bn_track_running_stats=True,
  ):
      super(ResNetBasicBlock, self).__init__()
      assert stride == 1 or stride == 2, "invalid stride {:}".format(
          stride
      )
      self.conv_a = ReLUConvBN(
          inplanes,
          planes,
          3,
          stride,
          1,
          1,
          bn_affine,
          bn_momentum,
          bn_track_running_stats,
      )
      self.conv_b = ReLUConvBN(
          planes,
          planes,
          3,
          1,
          1,
          1,
          bn_affine,
          bn_momentum,
          bn_track_running_stats,
      )
      if stride == 2:
          self.downsample = nn.Sequential(
              nn.AvgPool2d(kernel_size=2, stride=2, padding=0),
              nn.Conv2d(
                  inplanes,
                  planes,
                  kernel_size=1,
                  stride=1,
                  padding=0,
                  bias=False,
              ),
          )
      elif inplanes != planes:
          self.downsample = ReLUConvBN(
              inplanes,
              planes,
              1,
              1,
              0,
              1,
              bn_affine,
              bn_momentum,
              bn_track_running_stats,
          )
      else:
          self.downsample = None
      self.in_dim = inplanes
      self.out_dim = planes
      self.stride = stride
      self.num_conv = 2
  
imports: import argparse
  import json
  import logging
  import os
  import pprint
  import numpy
  import pandas
  import torch
  import torch.nn
  import torch.optim
  from torch.utils.data import DataLoader
  from nni.algorithms.nas.pytorch.darts import DartsTrainer
  from nni.algorithms.nas.pytorch import enas
  from nni.nas.pytorch.utils import AverageMeterGroup
  from nni.nas.pytorch.nasbench201 import NASBench201Cell
  from nni.nas.pytorch.fixed import apply_fixed_architecture
  from nni.nas.benchmarks.nasbench201 import query_nb201_trial_stats
  from nni.nas.pytorch.callbacks import ArchitectureCheckpoint, LRSchedulerCallback
  from utils import accuracy, reward_accuracy
  import datasets
label_desc: Use image node_id 1 to create a new ResNetBasicBlock object from inherited base classes: nn with example: obj = ResNetBasicBlock(inplanes, planes, stride, bn_affine, bn_momentum, bn_track_running_stats)