code: def conv_output_length(
      input_length, filter_size, padding, stride, dilation=1
  ):
      """Determines output length of a convolution given input length.
  
      Args:
          input_length: integer.
          filter_size: integer.
          padding: one of "same", "valid", "full".
          stride: integer.
          dilation: dilation rate, integer.
  
      Returns:
          The output length (integer).
      """
      if input_length is None:
          return None
      assert padding in {"same", "valid", "full"}
      dilated_filter_size = filter_size + (filter_size - 1) * (
          dilation - 1
      )
      if padding == "same":
          output_length = input_length
      elif padding == "valid":
          output_length = input_length - dilated_filter_size + 1
      elif padding == "full":
          output_length = input_length + dilated_filter_size - 1
      return (output_length + stride - 1) // stride
  
file_path: tensorflow-upstream/tensorflow/python/layers/utils.py
imports: from tensorflow.python.framework import smart_cond
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import variables
label_desc: Use image node_id 5 for calling a global function with example usage: conv_output_length(input_length, filter_size, padding, stride, dilation) and returns: unknown, None