code: def _reduce_strides_dilations(dim, stride, dilations):
      if not isinstance(stride, int):
          if len(stride) > dim:
              stride = stride[1:-1]
          if len(stride) == 1 and dim != 1:
              stride = stride[0]
      if not isinstance(dilations, int):
          if len(dilations) > dim:
              dilations = dilations[1:-1]
          if len(dilations) == 1 and dim != 1:
              dilations = dilations[0]
      return stride, dilations
  
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 3 for calling a global function with example usage: _reduce_strides_dilations(dim, stride, dilations) and returns: stride,  dilations