parameters: (value, n, name)
return_statement: return value_tuple
docstring: Transforms a single int or iterable of ints into an int tuple.
  
    Arguments:
        value: The value to validate and convert. Could an int, or any iterable
          of ints.
        n: The size of the tuple to be returned.
        name: The name of the argument being validated, e.g. "strides" or
          "kernel_size". This is only used to format error messages.
  
    Returns:
        A tuple of n integers.
  
    Raises:
        ValueError: If something else than an int/long or iterable thereof was
        passed.
docstring_summary: Transforms a single int or iterable of ints into an int tuple.
docstring_tokens: Transforms a single int or iterable of ints into an int tuple .
function: def normalize_tuple(value, n, name):
    """Transforms a single int or iterable of ints into an int tuple.
  
    Arguments:
        value: The value to validate and convert. Could an int, or any iterable
          of ints.
        n: The size of the tuple to be returned.
        name: The name of the argument being validated, e.g. "strides" or
          "kernel_size". This is only used to format error messages.
  
    Returns:
        A tuple of n integers.
  
    Raises:
        ValueError: If something else than an int/long or iterable thereof was
        passed.
    """
    if isinstance(value, int):
      return (value,) * n
    else:
      try:
        value_tuple = tuple(value)
      except TypeError:
        raise ValueError('The `' + name + '` argument must be a tuple of ' +
                         str(n) + ' integers. Received: ' + str(value))
      if len(value_tuple) != n:
        raise ValueError('The `' + name + '` argument must be a tuple of ' +
                         str(n) + ' integers. Received: ' + str(value))
      for single_value in value_tuple:
        try:
          int(single_value)
        except ValueError:
          raise ValueError('The `' + name + '` argument must be a tuple of ' +
                           str(n) + ' integers. Received: ' + str(value) + ' '
                           'including element ' + str(single_value) + ' of type' +
                           ' ' + str(type(single_value)))
    return value_tuple
function_tokens: def normalize_tuple ( value , n , name ) : if isinstance ( value , int ) : return ( value , ) * n else : try : value_tuple = tuple ( value ) except TypeError : raise ValueError ( 'The `' + name + '` argument must be a tuple of ' + str ( n ) + ' integers. Received: ' + str ( value ) ) if len ( value_tuple ) != n : raise ValueError ( 'The `' + name + '` argument must be a tuple of ' + str ( n ) + ' integers. Received: ' + str ( value ) ) for single_value in value_tuple : try : int ( single_value ) except ValueError : raise ValueError ( 'The `' + name + '` argument must be a tuple of ' + str ( n ) + ' integers. Received: ' + str ( value ) + ' ' 'including element ' + str ( single_value ) + ' of type' + ' ' + str ( type ( single_value ) ) ) return value_tuple