code: def _pre():
      maxn = 10**5
      global _factor
      global _totient
      _factor = [0] * maxn
      _totient = [1] * maxn
      lim = int(maxn**0.5) + 5
      for i in range(2, lim):
          if _factor[i] == 0:
              for j in range(i * i, maxn, i):
                  if _factor[j] == 0:
                      _factor[j] = i
      for i in range(2, maxn):
          if _factor[i] == 0:
              _factor[i] = i
              _totient[i] = i - 1
              continue
          x = _factor[i]
          y = i // x
          if y % x == 0:
              _totient[i] = _totient[y] * x
          else:
              _totient[i] = _totient[y] * (x - 1)
  
file_path: sympy/sympy/ntheory/partitions_.py
imports: from mpmath.libmp import fzero, from_int, from_rational, fone, fhalf, bitcount, to_int, to_str, mpf_mul, mpf_div, mpf_sub, mpf_add, mpf_sqrt, mpf_pi, mpf_cosh_sinh, mpf_cos, mpf_sin
  from sympy.external.gmpy import gcd, legendre, jacobi
  from .residue_ntheory import _sqrt_mod_prime_power, is_quad_residue
  import math
label_desc: Use image node_id 1 for calling a global function with example usage: _pre() without return types