class_docstr: The basic class for cell operation search, which contains a preprocessing operation and a mixed cell operation.
  Each cell is defined on a `path` in the topology search space.
  Args:
      c_prev: number of input channels
      c: number of output channels
      rate: resolution change rate. It represents the preprocessing operation before the mixed cell operation.
          ``-1`` for 2x downsample, ``1`` for 2x upsample, ``0`` for no change of resolution.
      arch_code_c: cell operation code
class_docstr_tok: ["The","basic","class","for","cell","operation","search",",","which","contains","a","preprocessing","operation","and","a","mixed","cell","operation",".","Each","cell","is","defined","on","a","`","path","`","in","the","topology","search","space",".","Args",":","c_prev",":","number","of","input","channels","c",":","number","of","output","channels","rate",":","resolution","change","rate",".","It","represents","the","preprocessing","operation","before","the","mixed","cell","operation",".","``","-1","``","for","2x","downsample",",","``","1","``","for","2x","upsample",",","``","0","``","for","no","change","of","resolution",".","arch_code_c",":","cell","operation","code"]
code: def __init__(
      self,
      c_prev: int,
      c: int,
      rate: int,
      arch_code_c=None,
      spatial_dims: int = 3,
      act_name: tuple | str = "RELU",
      norm_name: tuple | str = ("INSTANCE", {"affine": True}),
  ):
      super().__init__()
      self._spatial_dims = spatial_dims
      self._act_name = act_name
      self._norm_name = norm_name
  
      if rate == -1:  # downsample
          self.preprocess = self.ConnOPS["down"](
              c_prev,
              c,
              spatial_dims=self._spatial_dims,
              act_name=self._act_name,
              norm_name=self._norm_name,
          )
      elif rate == 1:  # upsample
          self.preprocess = self.ConnOPS["up"](
              c_prev,
              c,
              spatial_dims=self._spatial_dims,
              act_name=self._act_name,
              norm_name=self._norm_name,
          )
      else:
          if c_prev == c:
              self.preprocess = self.ConnOPS["identity"]()
          else:
              self.preprocess = self.ConnOPS["align_channels"](
                  c_prev,
                  c,
                  1,
                  0,
                  spatial_dims=self._spatial_dims,
                  act_name=self._act_name,
                  norm_name=self._norm_name,
              )
  
      # Define 2D operation set, parameterized by the number of channels
      self.OPS2D = {
          "skip_connect": lambda _c: _IdentityWithRAMCost(),
          "conv_3x3": lambda c: _ActiConvNormBlockWithRAMCost(
              c,
              c,
              3,
              padding=1,
              spatial_dims=2,
              act_name=self._act_name,
              norm_name=self._norm_name,
          ),
      }
  
      # Define 3D operation set, parameterized by the number of channels
      self.OPS3D = {
          "skip_connect": lambda _c: _IdentityWithRAMCost(),
          "conv_3x3x3": lambda c: _ActiConvNormBlockWithRAMCost(
              c,
              c,
              3,
              padding=1,
              spatial_dims=3,
              act_name=self._act_name,
              norm_name=self._norm_name,
          ),
          "conv_3x3x1": lambda c: _P3DActiConvNormBlockWithRAMCost(
              c,
              c,
              3,
              padding=1,
              p3dmode=0,
              act_name=self._act_name,
              norm_name=self._norm_name,
          ),
          "conv_3x1x3": lambda c: _P3DActiConvNormBlockWithRAMCost(
              c,
              c,
              3,
              padding=1,
              p3dmode=1,
              act_name=self._act_name,
              norm_name=self._norm_name,
          ),
          "conv_1x3x3": lambda c: _P3DActiConvNormBlockWithRAMCost(
              c,
              c,
              3,
              padding=1,
              p3dmode=2,
              act_name=self._act_name,
              norm_name=self._norm_name,
          ),
      }
  
      self.OPS = {}
      if self._spatial_dims == 2:
          self.OPS = self.OPS2D
      elif self._spatial_dims == 3:
          self.OPS = self.OPS3D
      else:
          raise NotImplementedError(
              f"Spatial dimensions {self._spatial_dims} is not supported."
          )
  
      self.op = MixedOp(c, self.OPS, arch_code_c)
  
imports: from __future__ import annotations
  import datetime
  import warnings
  from typing import Optional
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from monai.networks.blocks.dints_block import ActiConvNormBlock, FactorizedIncreaseBlock, FactorizedReduceBlock, P3DActiConvNormBlock
  from monai.networks.layers.factories import Conv
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
  from monai.utils import optional_import
label_desc: Use image node_id 1 to create a new Cell object from inherited base classes: CellInterface with example: obj = Cell(c_prev, c, rate, arch_code_c, spatial_dims, act_name, norm_name)