code: def _is_nilpotent_number(factors: dict) -> bool:
      """Check whether `n` is a nilpotent number.
      Note that ``factors`` is a prime factorization of `n`.
  
      This is a low-level helper for ``is_nilpotent_number``, for internal use.
      """
      for p in factors.keys():
          for q, e in factors.items():
              # We want to calculate
              # any(pow(q, k, p) == 1 for k in range(1, e + 1))
              m = 1
              for _ in range(e):
                  m = m * q % p
                  if m == 1:
                      return False
      return True
  
file_path: sympy/sympy/combinatorics/group_numbers.py
imports: from itertools import chain, combinations
  from sympy.external.gmpy import gcd
  from sympy.ntheory.factor_ import factorint
  from sympy.utilities.misc import as_int
label_desc: Use image node_id 1 for calling a global function with example usage: _is_nilpotent_number(factors) and returns: True, False