code: def conv_input_length(output_length, filter_size, padding, stride):
      """Determines input length of a convolution given output length.
  
      Args:
          output_length: integer.
          filter_size: integer.
          padding: one of "same", "valid", "full".
          stride: integer.
  
      Returns:
          The input length (integer).
      """
      if output_length is None:
          return None
      assert padding in {"same", "valid", "full"}
      if padding == "same":
          pad = filter_size // 2
      elif padding == "valid":
          pad = 0
      elif padding == "full":
          pad = filter_size - 1
      return (output_length - 1) * stride - 2 * pad + filter_size
  
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 6 for calling a global function with example usage: conv_input_length(output_length, filter_size, padding, stride) and returns: unknown, None