code: def test_apply_support():
      E = Symbol("E")
      I = Symbol("I")
  
      b = Beam(4, E, I)
      b.apply_support(0, "cantilever")
      b.apply_load(20, 4, -1)
      M_0, R_0 = symbols("M_0, R_0")
      b.solve_for_reaction_loads(R_0, M_0)
      assert simplify(b.slope()) == simplify(
          (
              80 * SingularityFunction(x, 0, 1)
              - 10 * SingularityFunction(x, 0, 2)
              + 10 * SingularityFunction(x, 4, 2)
          )
          / (E * I)
      )
      assert simplify(b.deflection()) == simplify(
          (
              40 * SingularityFunction(x, 0, 2)
              - 10 * SingularityFunction(x, 0, 3) / 3
              + 10 * SingularityFunction(x, 4, 3) / 3
          )
          / (E * I)
      )
  
      b = Beam(30, E, I)
      b.apply_support(10, "pin")
      b.apply_support(30, "roller")
      b.apply_load(-8, 0, -1)
      b.apply_load(120, 30, -2)
      R_10, R_30 = symbols("R_10, R_30")
      b.solve_for_reaction_loads(R_10, R_30)
      assert b.slope() == (
          -4 * SingularityFunction(x, 0, 2)
          + 3 * SingularityFunction(x, 10, 2)
          + 120 * SingularityFunction(x, 30, 1)
          + SingularityFunction(x, 30, 2)
          + Rational(4000, 3)
      ) / (E * I)
      assert b.deflection() == (
          x * Rational(4000, 3)
          - 4 * SingularityFunction(x, 0, 3) / 3
          + SingularityFunction(x, 10, 3)
          + 60 * SingularityFunction(x, 30, 2)
          + SingularityFunction(x, 30, 3) / 3
          - 12000
      ) / (E * I)
  
      P = Symbol("P", positive=True)
      L = Symbol("L", positive=True)
      b = Beam(L, E, I)
      b.apply_support(0, type="fixed")
      b.apply_support(L, type="fixed")
      b.apply_load(-P, L / 2, -1)
      R_0, R_L, M_0, M_L = symbols("R_0, R_L, M_0, M_L")
      b.solve_for_reaction_loads(R_0, R_L, M_0, M_L)
      assert b.reaction_loads == {
          R_0: P / 2,
          R_L: P / 2,
          M_0: -L * P / 8,
          M_L: L * P / 8,
      }
  
imports: from sympy.core.function import expand
  from sympy.core.numbers import Rational, pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.sets.sets import Interval
  from sympy.simplify.simplify import simplify
  from sympy.physics.continuum_mechanics.beam import Beam
  from sympy.functions import SingularityFunction, Piecewise, meijerg, Abs, log
  from sympy.testing.pytest import raises
  from sympy.physics.units import meter, newton, kilo, giga, milli
  from sympy.physics.continuum_mechanics.beam import Beam3D
  from sympy.geometry import Circle, Polygon, Point2D, Triangle
  from sympy.core.sympify import sympify
label_desc: Use image node_id 9 for calling a global function with example usage: test_apply_support() without return types