code: def test_visual_io():
      sm = smoothness_p
      fi = factorint
      # with smoothness_p
      n = 124
      d = fi(n)
      m = fi(d, visual=True)
      t = sm(n)
      s = sm(t)
      for th in [d, s, t, n, m]:
          assert sm(th, visual=True) == s
          assert sm(th, visual=1) == s
      for th in [d, s, t, n, m]:
          assert sm(th, visual=False) == t
      assert [sm(th, visual=None) for th in [d, s, t, n, m]] == [
          s,
          d,
          s,
          t,
          t,
      ]
      assert [sm(th, visual=2) for th in [d, s, t, n, m]] == [
          s,
          d,
          s,
          t,
          t,
      ]
  
      # with factorint
      for th in [d, m, n]:
          assert fi(th, visual=True) == m
          assert fi(th, visual=1) == m
      for th in [d, m, n]:
          assert fi(th, visual=False) == d
      assert [fi(th, visual=None) for th in [d, m, n]] == [m, d, d]
      assert [fi(th, visual=0) for th in [d, m, n]] == [m, d, d]
  
      # test reevaluation
      no = {"evaluate": False}
      assert sm({4: 2}, visual=False) == sm(16)
      assert sm(
          Mul(
              *[Pow(k, v, **no) for k, v in {4: 2, 2: 6}.items()], **no
          ),
          visual=False,
      ) == sm(2**10)
  
      assert fi({4: 2}, visual=False) == fi(16)
      assert fi(
          Mul(
              *[Pow(k, v, **no) for k, v in {4: 2, 2: 6}.items()], **no
          ),
          visual=False,
      ) == fi(2**10)
  
imports: from sympy.concrete.summations import summation
  from sympy.core.containers import Dict
  from sympy.core.mul import Mul
  from sympy.core.power import Pow
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.core.numbers import Integer, Rational
  from sympy.external.gmpy import gcd
  from sympy.ntheory import totient, factorint, primefactors, divisors, nextprime, primerange, pollard_rho, perfect_power, multiplicity, multiplicity_in_factorial, divisor_count, primorial, pollard_pm1, divisor_sigma, factorrat, reduced_totient
  from sympy.ntheory.factor_ import smoothness, smoothness_p, proper_divisors, antidivisors, antidivisor_count, core, udivisors, udivisor_sigma, udivisor_count, proper_divisor_count, primenu, primeomega, mersenne_prime_exponent, is_perfect, is_abundant, is_deficient, is_amicable, dra, drm, _perfect_power
  from sympy.testing.pytest import raises, slow
  from sympy.utilities.iterables import capture
label_desc: Use image node_id 26 for calling a global function with example usage: test_visual_io() without return types