code: def test_Dimension_add_sub():
      assert length + length == length
      assert length - length == length
      assert -length == length
  
      raises(TypeError, lambda: length + foot)
      raises(TypeError, lambda: foot + length)
      raises(TypeError, lambda: length - foot)
      raises(TypeError, lambda: foot - length)
  
      # issue 14547 - only raise error for dimensional args; allow
      # others to pass
      x = Symbol("x")
      e = length + x
      assert e == x + length and e.is_Add and set(e.args) == {length, x}
      e = length + 1
      assert (
          e == 1 + length == 1 - length
          and e.is_Add
          and set(e.args) == {length, 1}
      )
  
      assert dimsys_SI.get_dimensional_dependencies(
          mass * length / time**2 + force
      ) == {length: 1, mass: 1, time: -2}
      assert dimsys_SI.get_dimensional_dependencies(
          mass * length / time**2 + force - pressure * length**2
      ) == {length: 1, mass: 1, time: -2}
  
      raises(
          TypeError,
          lambda: dimsys_SI.get_dimensional_dependencies(
              mass * length / time**2 + pressure
          ),
      )
  
file_path: sympy/sympy/physics/units/tests/test_dimensions.py
imports: from sympy.physics.units.systems.si import dimsys_SI
  from sympy.core.numbers import pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.functions.elementary.complexes import Abs
  from sympy.functions.elementary.exponential import log
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.functions.elementary.trigonometric import acos, atan2, cos
  from sympy.physics.units.dimensions import Dimension
  from sympy.physics.units.definitions.dimension_definitions import length, time, mass, force, pressure, angle
  from sympy.physics.units import foot
  from sympy.testing.pytest import raises
label_desc: Use image node_id 5 for calling a global function with example usage: test_Dimension_add_sub() without return types