code: def _deconv_length(
      dim_size, stride_size, kernel_size, padding, dilation=1
  ):
      kernel_size = kernel_size + (kernel_size - 1) * (dilation - 1)
      if padding == "SAME":
          dim_size = dim_size * stride_size
      else:
          dim_size = dim_size * stride_size + max(
              kernel_size - stride_size, 0
          )
      return dim_size
  
imports: from typing import Optional, Tuple, Union, Sequence
  import ivy
  from ivy.utils.backend import current_backend
  from ivy.func_wrapper import handle_array_function, handle_partial_mixed_function, inputs_to_ivy_arrays, to_native_arrays_and_back, inputs_to_native_shapes, handle_out_argument, handle_nestable, handle_array_like_without_promotion, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 22 for calling a global function with example usage: _deconv_length(dim_size, stride_size, kernel_size, padding, dilation) and returns: dim_size