code: def block_autoregressive(input_dim, **kwargs):
      r"""
      A helper function to create a
      :class:`~pyro.distributions.transforms.BlockAutoregressive` object for
      consistency with other helpers.
  
      :param input_dim: Dimension of input variable
      :type input_dim: int
      :param hidden_factors: Hidden layer i has hidden_factors[i] hidden units per
          input dimension. This corresponds to both :math:`a` and :math:`b` in De Cao
          et al. (2019). The elements of hidden_factors must be integers.
      :type hidden_factors: list
      :param activation: Activation function to use. One of 'ELU', 'LeakyReLU',
          'sigmoid', or 'tanh'.
      :type activation: string
      :param residual: Type of residual connections to use. Choices are "None",
          "normal" for :math:`\mathbf{y}+f(\mathbf{y})`, and "gated" for
          :math:`\alpha\mathbf{y} + (1 - \alpha\mathbf{y})` for learnable
          parameter :math:`\alpha`.
      :type residual: string
  
      """
  
      return BlockAutoregressive(input_dim, **kwargs)
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from ..None import constraints
  from ..torch_transform import TransformModule
  from ..util import copy_docs_from
  from .neural_autoregressive import ELUTransform, LeakyReLUTransform, TanhTransform
label_desc: Use image node_id 2 for calling a global function with example usage: block_autoregressive(input_dim) and returns: BlockAutoregressive