input: def is_armstrong_number(num: int) -> bool:
      """Check if a given number is an Armstrong number.
      >>> is_armstrong_number(153)
      True
      >>> is_armstrong_number(9474)
      True
      >>> is_armstrong_number(123)
      False
      """
output:     num_str = str(num)
      num_digits = len(num_str)
      sum_of_powers = sum(int(digit) ** num_digits for digit in num_str)
      return sum_of_powers == num