code: def rotate_dom_by_yaw(self, dom_id, heading, centre_point=None):
          
          pmts = self.pmts[self.pmts.dom_id == dom_id]
          if centre_point is None:
              centre_point = self.dom_positions[dom_id]
  
          for pmt in pmts:
              pmt_pos = np.array([pmt.pos_x, pmt.pos_y, pmt.pos_z])
              pmt_dir = np.array([pmt.dir_x, pmt.dir_y, pmt.dir_z])
              pmt_radius = np.linalg.norm(centre_point - pmt_pos)
              index = self._pmt_index_by_pmt_id[pmt.pmt_id]
              pmt_ref = self.pmts[index]
  
              dir_rot = qrot_yaw([pmt.dir_x, pmt.dir_y, pmt.dir_z], heading)
              pos_rot = pmt_pos - pmt_dir * pmt_radius + dir_rot * pmt_radius
  
              pmt_ref.dir_x = dir_rot[0]
              pmt_ref.dir_y = dir_rot[1]
              pmt_ref.dir_z = dir_rot[2]
              pmt_ref.pos_x = pos_rot[0]
              pmt_ref.pos_y = pos_rot[1]
              pmt_ref.pos_z = pos_rot[2]
          self.reset_caches()
docs: Rotate a DOM by a given (yaw) heading.