def METHOD_NAME(factors):
  """
  The Euler totient calculated by given prime factors.
  Args:
      factors: Dictionary of prime factors (keys) and their exponents (values).
  Returns:
      An integer. The value of the Euler totient.
  Usage:
      >>> phi({2: 2, 5: 2})
      40
      >>> phi({2: 2, 5: 2, 7: 1})
      240
  """
  phiN = 1
  for factor, count in factors.items():
    if count == 0:
      continue
    phiN = phiN*(factor-1)*factor**(count-1)
  return phiN