code: def center_of_mass(point, *bodies):
      """
      Returns the position vector from the given point to the center of mass
      of the given bodies(particles or rigidbodies).
  
      Example
      =======
  
      >>> from sympy import symbols, S
      >>> from sympy.physics.vector import Point
      >>> from sympy.physics.mechanics import Particle, ReferenceFrame, RigidBody, outer
      >>> from sympy.physics.mechanics.functions import center_of_mass
      >>> a = ReferenceFrame('a')
      >>> m = symbols('m', real=True)
      >>> p1 = Particle('p1', Point('p1_pt'), S(1))
      >>> p2 = Particle('p2', Point('p2_pt'), S(2))
      >>> p3 = Particle('p3', Point('p3_pt'), S(3))
      >>> p4 = Particle('p4', Point('p4_pt'), m)
      >>> b_f = ReferenceFrame('b_f')
      >>> b_cm = Point('b_cm')
      >>> mb = symbols('mb')
      >>> b = RigidBody('b', b_cm, b_f, mb, (outer(b_f.x, b_f.x), b_cm))
      >>> p2.point.set_pos(p1.point, a.x)
      >>> p3.point.set_pos(p1.point, a.x + a.y)
      >>> p4.point.set_pos(p1.point, a.y)
      >>> b.masscenter.set_pos(p1.point, a.y + a.z)
      >>> point_o=Point('o')
      >>> point_o.set_pos(p1.point, center_of_mass(p1.point, p1, p2, p3, p4, b))
      >>> expr = 5/(m + mb + 6)*a.x + (m + mb + 3)/(m + mb + 6)*a.y + mb/(m + mb + 6)*a.z
      >>> point_o.pos_from(p1.point)
      5/(m + mb + 6)*a.x + (m + mb + 3)/(m + mb + 6)*a.y + mb/(m + mb + 6)*a.z
  
      """
      if not bodies:
          raise TypeError(
              "No bodies(instances of Particle or Rigidbody) were passed."
          )
  
      total_mass = 0
      vec = Vector(0)
      for i in bodies:
          total_mass += i.mass
  
          masscenter = getattr(i, "masscenter", None)
          if masscenter is None:
              masscenter = i.point
          vec += i.mass * masscenter.pos_from(point)
  
      return vec / total_mass
  
imports: from sympy.utilities import dict_merge
  from sympy.utilities.iterables import iterable
  from sympy.physics.vector import Dyadic, Vector, ReferenceFrame, Point, dynamicsymbols
  from sympy.physics.vector.printing import vprint, vsprint, vpprint, vlatex, init_vprinting
  from sympy.physics.mechanics.particle import Particle
  from sympy.physics.mechanics.rigidbody import RigidBody
  from sympy.simplify.simplify import simplify
  from sympy import Matrix, Mul, Derivative, sin, cos, tan, S
  from sympy.core.function import AppliedUndef
  from sympy.physics.mechanics.inertia import inertia, inertia_of_point_mass
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 9 for calling a global function with example usage: center_of_mass(point) and returns: unknown