parameters: (max_value)
docstring: Returns the maximum number of bytes a varint can take when encoded.
docstring_summary: Returns the maximum number of bytes a varint can take when encoded.
docstring_tokens: Returns the maximum number of bytes a varint can take when encoded .
function: def varint_max_size(max_value):
      '''Returns the maximum number of bytes a varint can take when encoded.'''
      if max_value < 0:
          max_value = 2**64 - max_value
      for i in range(1, 11):
          if (max_value >> (i * 7)) == 0:
              return i
      raise ValueError("Value too large for varint: " + str(max_value))
function_tokens: def varint_max_size ( max_value ) : if max_value < 0 : max_value = 2 ** 64 - max_value for i in range ( 1 , 11 ) : if ( max_value >> ( i * 7 ) ) == 0 : return i raise ValueError ( "Value too large for varint: " + str ( max_value ) )