code: def conv_general_dilated(
      x: Union[tf.Tensor, tf.Variable],
      filters: Union[tf.Tensor, tf.Variable],
      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[Union[tf.Tensor, tf.Variable]] = None,
      out: Optional[Union[tf.Tensor, tf.Variable]] = None,
  ) -> Union[tf.Tensor, tf.Variable]:
      if filter_format == "channel_first":
          filters = tf.transpose(filters, (*range(2, dims + 2), 1, 0))
  
      num_channels = (
          x.shape[1] if data_format == "channel_first" else x.shape[-1]
      )
      if filters.shape[-2] != (num_channels // feature_group_count):
          raise ivy.utils.exceptions.IvyError(
              f"given feature_group_count {feature_group_count} expected input channel of"
              f" the filter to be {num_channels // feature_group_count} but got"
              f" {filters.shape[-2]}"
          )
      if num_channels % feature_group_count != 0:
          raise ivy.utils.exceptions.IvyError(
              "input channel should be divisible by feature group count"
              f" {feature_group_count} but got input channel {num_channels}"
          )
  
      permuted_x = False
      if data_format == "channel_first" and (
          ivy.dev(x) == "cpu" or feature_group_count != 1
      ):
          x = tf.transpose(x, (0, *range(2, dims + 2), 1))
          data_format = "channel_last"
          permuted_x = True
  
      data_format = _get_x_data_format(dims, data_format)
  
      x = _x_dil_before_conv(x, dims, x_dilations, data_format)
  
      if dims == 2:
          padding = _extend_2d_padding(padding, data_format)
          if feature_group_count == 1:
              res = tf.nn.conv2d(
                  x,
                  filters,
                  strides,
                  padding,
                  data_format=data_format,
                  dilations=dilations,
              )
          else:
              res = tf.concat(
                  [
                      tf.nn.conv2d(
                          x[..., i : i + filters.shape[-2]],
                          filters[
                              ...,
                              j : j
                              + filters.shape[-1]
                              // feature_group_count,
                          ],
                          strides,
                          padding,
                          data_format,
                          dilations,
                      )
                      for i, j in zip(
                          range(0, x.shape[-1], filters.shape[-2]),
                          range(
                              0,
                              filters.shape[-1],
                              filters.shape[-1] // feature_group_count,
                          ),
                      )
                  ],
                  axis=-1,
              )
      else:
          x, padding = _pad_before_conv(x, padding, dims, data_format)
          if dims == 1:
              if feature_group_count == 1:
                  res = tf.nn.conv1d(
                      x,
                      filters,
                      strides,
                      padding,
                      data_format=data_format,
                      dilations=dilations,
                  )
              else:
                  res = tf.concat(
                      [
                          tf.nn.conv1d(
                              x[..., i : i + filters.shape[-2]],
                              filters[
                                  ...,
                                  j : j
                                  + filters.shape[-1]
                                  // feature_group_count,
                              ],
                              strides,
                              padding,
                              data_format,
                              dilations,
                          )
                          for i, j in zip(
                              range(0, x.shape[-1], filters.shape[-2]),
                              range(
                                  0,
                                  filters.shape[-1],
                                  filters.shape[-1]
                                  // feature_group_count,
                              ),
                          )
                      ],
                      axis=-1,
                  )
          else:
              strides, dilations = _extend_3d_strides_dilations(
                  strides, dilations, data_format
              )
              if feature_group_count == 1:
                  res = tf.nn.conv3d(
                      x,
                      filters,
                      strides,
                      padding,
                      data_format=data_format,
                      dilations=dilations,
                  )
              else:
                  res = tf.concat(
                      [
                          tf.nn.conv3d(
                              x[..., i : i + filters.shape[-2]],
                              filters[
                                  ...,
                                  j : j
                                  + filters.shape[-1]
                                  // feature_group_count,
                              ],
                              strides,
                              padding,
                              data_format,
                              dilations,
                          )
                          for i, j in zip(
                              range(0, x.shape[-1], filters.shape[-2]),
                              range(
                                  0,
                                  filters.shape[-1],
                                  filters.shape[-1]
                                  // feature_group_count,
                              ),
                          )
                      ],
                      axis=-1,
                  )
      if bias is not None:
          if data_format[1] == "C":
              bias = tf.reshape(bias, [1, -1, *([1] * dims)])
          res = tf.math.add(res, bias)
      if permuted_x:
          return tf.transpose(res, (0, dims + 1, *range(1, dims + 1)))
      return res
  
imports: from typing import Optional, Tuple, Union, Sequence
  import tensorflow
  from tensorflow.python.types.core import Tensor
  import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
  from .None import backend_version
  from ivy.functional.ivy.layers import _deconv_length, _get_x_data_format
label_desc: Use image node_id 14 for calling a global function with example usage: conv_general_dilated() and returns: res, tf