code: def test_deprecated_set_potential_energy():
      m, g, h = symbols("m g h")
      A = ReferenceFrame("A")
      P = Point("P")
      I = Dyadic(0)
      B = RigidBody("B", P, A, m, (I, P))
      with warns_deprecated_sympy():
          B.set_potential_energy(m * g * h)
  
file_path: sympy/sympy/physics/mechanics/tests/test_rigidbody.py
imports: from sympy.physics.mechanics import Point, ReferenceFrame, Dyadic, RigidBody
  from sympy.physics.mechanics import dynamicsymbols, outer, inertia, Inertia
  from sympy.physics.mechanics import inertia_of_point_mass
  from sympy import expand, zeros, simplify, symbols
  from sympy.testing.pytest import raises, warns_deprecated_sympy
label_desc: Use image node_id 8 for calling a global function with example usage: test_deprecated_set_potential_energy() without return types