class_docstr: This dense block is defined as a sequence of `Convolution` or `ResidualUnit` blocks. The `_get_layer` method returns
  an object for each layer and can be overridden to change the composition of the block.
  
  Args:
      spatial_dims: number of spatial dimensions.
      in_channels: number of input channels.
      channels: output channels for each layer.
      dilations: dilation value for each layer.
      kernel_size: convolution kernel size. Defaults to 3.
      num_res_units: number of convolutions. Defaults to 2.
      adn_ordering: a string representing the ordering of activation, normalization, and dropout. Defaults to "NDA".
      act: activation type and arguments. Defaults to PReLU.
      norm: feature normalization type and arguments. Defaults to instance norm.
      dropout: dropout ratio. Defaults to no dropout.
      bias: whether to have a bias term. Defaults to True.
code: def __init__(
      self,
      spatial_dims: int,
      in_channels: int,
      channels: Sequence[int],
      dilations: Sequence[int] | None = None,
      kernel_size: Sequence[int] | int = 3,
      num_res_units: int = 0,
      adn_ordering: str = "NDA",
      act: tuple | str | None = Act.PRELU,
      norm: tuple | str | None = Norm.INSTANCE,
      dropout: tuple | str | float | None = None,
      bias: bool = True,
  ):
      self.spatial_dims = spatial_dims
      self.kernel_size = kernel_size
      self.num_res_units = num_res_units
      self.adn_ordering = adn_ordering
      self.act = act
      self.norm = norm
      self.dropout = dropout
      self.bias = bias
  
      l_channels = in_channels
      dilations = (
          dilations if dilations is not None else ([1] * len(channels))
      )
      layers = []
  
      if len(channels) != len(dilations):
          raise ValueError(
              "Length of `channels` and `dilations` must match"
          )
  
      for c, d in zip(channels, dilations):
          layer = self._get_layer(l_channels, c, d)
          layers.append(layer)
          l_channels += c
  
      super().__init__(layers)
  
file_path: MONAI/monai/networks/blocks/denseblock.py
imports: from __future__ import annotations
  from typing import Sequence
  import torch
  import torch.nn
  from monai.networks.blocks import Convolution, ResidualUnit
  from monai.networks.layers.factories import Act, Norm
label_desc: Use image node_id 1 to create a new ConvDenseBlock object from inherited base classes: DenseBlock with example: obj = ConvDenseBlock(spatial_dims, in_channels, channels, dilations, kernel_size, num_res_units, adn_ordering, act, norm, dropout, bias)