parameters: ( n )
return_statement: return result
docstring: Return the Euler totient function of n.
docstring_summary: Return the Euler totient function of n.
docstring_tokens: Return the Euler totient function of n .
function: def phi( n ):
    """Return the Euler totient function of n."""
  
    assert isinstance( n, types.IntType ) or isinstance( n, types.LongType )
  
    if n < 3: return 1
  
    result = 1
    ff = factorization( n )
    for f in ff:
      e = f[1]
      if e > 1:
        result = result * f[0] ** (e-1) * ( f[0] - 1 )
      else:
        result = result * ( f[0] - 1 )
    return result
function_tokens: def phi ( n ) : assert isinstance ( n , types . IntType ) or isinstance ( n , types . LongType ) if n < 3 : return 1 result = 1 ff = factorization ( n ) for f in ff : e = f [ 1 ] if e > 1 : result = result * f [ 0 ] ** ( e - 1 ) * ( f [ 0 ] - 1 ) else : result = result * ( f [ 0 ] - 1 ) return result