code: def _convolution_broadcast_helper(
      arg, num_spatial_dims, channel_index, name="dilations"
  ):
      # Helper to broadcast dilations and strides to correct dims
      if arg is None:
          return [1] * num_spatial_dims
      else:
          if isinstance(arg, int):
              arg = [arg]
          else:
              arg = list(arg)
          len_arg = len(arg)
  
          if len_arg == num_spatial_dims + 2:
              return arg
  
          # Broadcast to rcorrect dimensions
          if len_arg == 1:
              arg = arg * num_spatial_dims
          elif len_arg != num_spatial_dims:
              raise ValueError(
                  f"{name} should be of length 1, "
                  f"{num_spatial_dims} or {num_spatial_dims + 2}. "
                  f"Received: {name}={arg} of length {len_arg}."
              )
  
      # Add dimensions for batch and channel
      if channel_index == 1:
          return [1, 1] + arg
      else:
          return [1] + arg + [1]
  
imports: import ivy
  from ivy.functional.frontends.tensorflow.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ivy.functional.frontends.tensorflow import check_tensorflow_casting
label_desc: Use image node_id 1 for calling a global function with example usage: _convolution_broadcast_helper(arg, num_spatial_dims, channel_index, name) and returns: unknown, unknown, unknown, arg