code: def test_divergence():
      assert divergence(Vector(0), R) is S.Zero
      assert divergence(R.x, R) is S.Zero
      assert divergence(R[0] ** 2 * R.x, R) == 2 * R[0]
      assert (
          divergence(R[0] * R[1] * R[2] * (R.x + R.y + R.z), R)
          == R[0] * R[1] + R[0] * R[2] + R[1] * R[2]
      )
      assert divergence(
          (1 / (R[0] * R[1] * R[2])) * (R.x + R.y + R.z), R
      ) == -1 / (R[0] * R[1] * R[2] ** 2) - 1 / (
          R[0] * R[1] ** 2 * R[2]
      ) - 1 / (
          R[0] ** 2 * R[1] * R[2]
      )
      v = P[0] * P.x + P[1] * P.y + P[2] * P.z
      assert divergence(v, P) == 3
      assert divergence(v, R).simplify() == 3
      assert divergence(P[0] * R.x + R[0] * P.x, R) == 2 * cos(q)
  
file_path: sympy/sympy/physics/vector/tests/test_fieldfunctions.py
imports: from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.physics.vector import ReferenceFrame, Vector, Point, dynamicsymbols
  from sympy.physics.vector.fieldfunctions import divergence, gradient, curl, is_conservative, is_solenoidal, scalar_potential, scalar_potential_difference
  from sympy.testing.pytest import raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_divergence() without return types