code: def test_extend():
      ms = UnitSystem((m, s), (c,))
      Js = Quantity("Js")
      Js.set_global_relative_scale_factor(1, joule * second)
      mks = ms.extend((kg,), (Js,))
  
      res = UnitSystem((m, s, kg), (c, Js))
      assert set(mks._base_units) == set(res._base_units)
      assert set(mks._units) == set(res._units)
  
file_path: sympy/sympy/physics/units/tests/test_unitsystem.py
imports: from sympy.physics.units import DimensionSystem, joule, second, ampere
  from sympy.core.numbers import Rational
  from sympy.core.singleton import S
  from sympy.physics.units.definitions import c, kg, m, s
  from sympy.physics.units.definitions.dimension_definitions import length, time
  from sympy.physics.units.quantities import Quantity
  from sympy.physics.units.unitsystem import UnitSystem
  from sympy.physics.units.util import convert_to
label_desc: Use image node_id 4 for calling a global function with example usage: test_extend() without return types