code: def test_units():
      assert convert_to((5 * m / s * day) / km, 1) == 432
      assert convert_to(foot / meter, meter) == Rational(3048, 10000)
      # amu is a pure mass so mass/mass gives a number, not an amount (mol)
      # TODO: need better simplification routine:
      assert str(convert_to(grams / amu, grams).n(2)) == "6.0e+23"
  
      # Light from the sun needs about 8.3 minutes to reach earth
      t = (1 * au / speed_of_light) / minute
      # TODO: need a better way to simplify expressions containing units:
      t = convert_to(convert_to(t, meter / minute), meter)
      assert t.simplify() == Rational(49865956897, 5995849160)
  
      # TODO: fix this, it should give `m` without `Abs`
      assert sqrt(m**2) == m
      assert (sqrt(m)) ** 2 == m
  
      t = Symbol("t")
      assert integrate(t * m / s, (t, 1 * s, 5 * s)) == 12 * m * s
      assert (t * m / s).integrate((t, 1 * s, 5 * s)) == 12 * m * s
  
imports: import warnings
  from sympy.core.add import Add
  from sympy.core.function import Function, diff
  from sympy.core.numbers import Number, Rational
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.functions.elementary.complexes import Abs
  from sympy.functions.elementary.exponential import exp, log
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import sin
  from sympy.integrals.integrals import integrate
  from sympy.physics.units import amount_of_substance, area, convert_to, find_unit, volume, kilometer, joule, molar_gas_constant, vacuum_permittivity, elementary_charge, volt, ohm
  from sympy.physics.units.definitions import amu, au, centimeter, coulomb, day, foot, grams, hour, inch, kg, km, m, meter, millimeter, minute, quart, s, second, speed_of_light, bit, byte, kibibyte, mebibyte, gibibyte, tebibyte, pebibyte, exbibyte, kilogram, gravitational_constant, electron_rest_mass
  from sympy.physics.units.definitions.dimension_definitions import Dimension, charge, length, time, temperature, pressure, energy, mass
  from sympy.physics.units.prefixes import PREFIXES, kilo
  from sympy.physics.units.quantities import PhysicalConstant, Quantity
  from sympy.physics.units.systems import SI
  from sympy.testing.pytest import raises
label_desc: Use image node_id 12 for calling a global function with example usage: test_units() without return types