class_docstr: Stage of 3D ResNet. It expects to have one or more tensors as input for
      single pathway (C2D, I3D, Slow), and multi-pathway (SlowFast) cases.
      More details can be found here:
  
      Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He.
      "SlowFast networks for video recognition."
      https://arxiv.org/pdf/1812.03982.pdf
class_docstr_tok: ["Stage","of","3D","ResNet",".","It","expects","to","have","one","or","more","tensors","as","input","for","single","pathway","(","C2D",",","I3D",",","Slow",")",",","and","multi-pathway","(","SlowFast",")","cases",".","More","details","can","be","found","here",":","Christoph","Feichtenhofer",",","Haoqi","Fan",",","Jitendra","Malik",",","and","Kaiming","He",".","``","SlowFast","networks","for","video","recognition",".","''","https",":","\/\/arxiv.org\/pdf\/1812.03982.pdf"]
code: def _construct(
      self,
      dim_in,
      dim_out,
      stride,
      dim_inner,
      num_groups,
      trans_func_name,
      stride_1x1,
      inplace_relu,
      nonlocal_inds,
      nonlocal_pool,
      instantiation,
      dilation,
      norm_module,
  ):
      for pathway in range(self.num_pathways):
          for i in range(self.num_blocks[pathway]):
              # Retrieve the transformation function.
              trans_func = get_trans_func(trans_func_name)
              # Construct the block.
              res_block = ResBlock(
                  dim_in[pathway] if i == 0 else dim_out[pathway],
                  dim_out[pathway],
                  self.temp_kernel_sizes[pathway][i],
                  stride[pathway] if i == 0 else 1,
                  trans_func,
                  dim_inner[pathway],
                  num_groups[pathway],
                  stride_1x1=stride_1x1,
                  inplace_relu=inplace_relu,
                  dilation=dilation[pathway],
                  norm_module=norm_module,
                  block_idx=i,
                  drop_connect_rate=self._drop_connect_rate,
              )
              self.add_module(
                  "pathway{}_res{}".format(pathway, i), res_block
              )
              if i in nonlocal_inds[pathway]:
                  nln = Nonlocal(
                      dim_out[pathway],
                      dim_out[pathway] // 2,
                      nonlocal_pool[pathway],
                      instantiation=instantiation,
                      norm_module=norm_module,
                  )
                  self.add_module(
                      "pathway{}_nonlocal{}".format(pathway, i), nln
                  )
  
imports: import torch
  import torch.nn
  from slowfast.models.common import drop_path
  from slowfast.models.nonlocal_helper import Nonlocal
  from slowfast.models.operators import SE, Swish
label_desc: Use image node_id 2 for calling the ResStage obj's underlying member method code with example usage: obj._construct(dim_in, dim_out, stride, dim_inner, num_groups, trans_func_name, stride_1x1, inplace_relu, nonlocal_inds, nonlocal_pool, instantiation, dilation, norm_module) without return types