code: def center_of_mass(self):
      return np.average(
          self.bubbles[:, :2], axis=0, weights=self.bubbles[:, 3]
      )
  
file_path: matplotlib/galleries/examples/misc/packed_bubbles.py
imports: import matplotlib.pyplot
  import numpy
label_desc: Use image node_id 2 for calling the BubbleChart obj's underlying member method code with example usage: obj.center_of_mass() and returns: np