code: def spline_coupling(
      input_dim,
      split_dim=None,
      hidden_dims=None,
      count_bins=8,
      bound=3.0,
  ):
      """
      A helper function to create a
      :class:`~pyro.distributions.transforms.SplineCoupling` object for consistency
      with other helpers.
  
      :param input_dim: Dimension of input variable
      :type input_dim: int
  
      """
  
      if split_dim is None:
          split_dim = input_dim // 2
  
      if hidden_dims is None:
          hidden_dims = [input_dim * 10, input_dim * 10]
  
      nn = DenseNN(
          split_dim,
          hidden_dims,
          param_dims=[
              (input_dim - split_dim) * count_bins,
              (input_dim - split_dim) * count_bins,
              (input_dim - split_dim) * (count_bins - 1),
              (input_dim - split_dim) * count_bins,
          ],
      )
  
      return SplineCoupling(input_dim, split_dim, nn, count_bins, bound)
  
file_path: pyro/pyro/distributions/transforms/spline_coupling.py
imports: import torch
  from pyro.nn import DenseNN
  from ..None import constraints
  from ..torch_transform import TransformModule
  from ..util import copy_docs_from
  from .spline import ConditionalSpline, Spline
label_desc: Use image node_id 1 for calling a global function with example usage: spline_coupling(input_dim, split_dim, hidden_dims, count_bins, bound) and returns: SplineCoupling