code: def conv_general_dilated(
      x: JaxArray,
      filters: JaxArray,
      strides: Union[
          int, Tuple[int], Tuple[int, int], Tuple[int, int, int]
      ],
      padding: Union[str, int, Sequence[Tuple[int, int]]],
      /,
      *,
      dims: int = 2,
      data_format: str = "channel_last",
      filter_format: str = "channel_last",
      feature_group_count: int = 1,
      x_dilations: Union[
          int, Tuple[int], Tuple[int, int], Tuple[int, int, int]
      ] = 1,
      dilations: Union[
          int, Tuple[int], Tuple[int, int], Tuple[int, int, int]
      ] = 1,
      bias: Optional[JaxArray] = None,
      out: Optional[JaxArray] = None,
  ):
      strides = (
          [strides] * dims if isinstance(strides, int) else strides
      )
      dilations = (
          [dilations] * dims
          if isinstance(dilations, int)
          else dilations
      )
      x_dilations = (
          [x_dilations] * dims
          if isinstance(x_dilations, int)
          else x_dilations
      )
      if isinstance(padding, int):
          padding = [(padding, padding)] * dims
      filter_df = _get_filter_dataformat(dims, filter_format)
      if len(x_dilations) != x_dilations.count(1):
          new_pad = [0] * dims
          x_shape = (
              list(x.shape[1 : dims + 1])
              if data_format == "channel_last"
              else list(x.shape[2:])
          )
          x_shape = [
              x_shape[i] + (x_shape[i] - 1) * (x_dilations[i] - 1)
              for i in range(dims)
          ]
          f_shape = (
              list(filters.shape[:dims])
              if filter_format == "channel_last"
              else list(filters.shape[2:])
          )
          f_shape = [
              f_shape[i] + (f_shape[i] - 1) * (dilations[i] - 1)
              for i in range(dims)
          ]
          if isinstance(padding, str):
              for i in range(dims):
                  new_pad[i] = _handle_padding(
                      x_shape[i], strides[i], f_shape[i], padding
                  )
              padding = [
                  (new_pad[i] // 2, new_pad[i] - new_pad[i] // 2)
                  for i in range(dims)
              ]
      df = _get_x_data_format(dims, data_format)
      promoted_type = jnp.promote_types(x.dtype, filters.dtype)
      x = x.astype(promoted_type)
      filters = filters.astype(promoted_type)
      res = jlax.conv_general_dilated(
          x,
          filters,
          strides,
          padding,
          x_dilations,
          dilations,
          (df, filter_df, df),
          feature_group_count,
      )
      if bias is not None:
          if data_format == "channel_last":
              return jnp.add(res, bias)
          return jnp.add(res, bias[(None,) + (...,) + (None,) * dims])
      return res
  
file_path: ivy/ivy/functional/backends/jax/layers.py
imports: import jax.lax
  import jax.numpy
  import ivy
  from ivy.functional.backends.jax import JaxArray
  from typing import Union, Tuple, Optional, Sequence
  from ivy.functional.ivy.layers import _handle_padding, _deconv_length, _get_x_data_format
label_desc: Use image node_id 12 for calling a global function with example usage: conv_general_dilated() and returns: res, jnp, jnp