code: def prepare_conv_args(
      filter_shape,
      rank,
      strides,
      padding,
      dilations,
      is_transpose=False,
      validate_args=False,
  ):
      """Sanitizes use provided input."""
      padding = _validate_padding(padding)
      try:
          rank = int(tf.get_static_value(rank))
      except TypeError:
          raise TypeError(
              "Argument `rank` must be statically known `int`."
          )
      valid_rank = {1, 2, 3}
      if rank not in valid_rank:
          raise ValueError(
              "Argument `rank` must be in {}.".format(valid_rank)
          )
      filter_shape = prepare_tuple_argument(
          filter_shape,
          n=rank,
          arg_name="filter_shape",
          validate_args=validate_args,
      )
      strides = prepare_tuple_argument(
          strides,
          n=rank,
          arg_name="strides",
          validate_args=validate_args,
      )
      padding = _prepare_padding_argument(padding)
      dilations = prepare_tuple_argument(
          dilations,
          n=rank,
          arg_name="dilations",
          validate_args=validate_args,
      )
  
      strides_ = [tf.get_static_value(s) for s in strides]
      dilations_ = [tf.get_static_value(d) for d in dilations]
      assertions = []
      if is_transpose:
          if all(s is not None for s in strides_) and all(
              d is not None for d in dilations_
          ):
              if any(s > 1 for s in strides_) and any(
                  d > 1 for d in dilations_
              ):
                  raise NotImplementedError(
                      "At least one of `dilations` and `strides` "
                      "must equal `1` for each dimension. Saw: "
                      "`strides={}`, `dilations={}`".format(
                          strides, dilations
                      )
                  )
          elif validate_args:
              assertions.append(
                  assert_util.assert_equal(
                      tf.logical_or(
                          tf.equal(tf.reduce_max(strides), 1),
                          tf.equal(tf.reduce_max(dilations), 1),
                      ),
                      True,
                      message="At least one of `dilations` and `strides` must equal `1` "
                      "for each dimension.",
                  )
              )
  
      with tf.control_dependencies(assertions):
          return filter_shape, rank, strides, padding, dilations
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.nn.util import utils
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 14 for calling a global function with example usage: prepare_conv_args(filter_shape, rank, strides, padding, dilations, is_transpose, validate_args) and returns: filter_shape,  rank,  strides,  padding,  dilations