code: def update(self, z):
          
  
          # run update on each filter, and save the likelihood
          for i, f in enumerate(self.filters):
              f.update(z)
              self.likelihood[i] = f.likelihood
  
          # update mode probabilities from total probability * likelihood
          self.mu = self.cbar * self.likelihood
          self.mu /= np.sum(self.mu)  # normalize
  
          self._compute_mixing_probabilities()
  
          # compute mixed IMM state and covariance and save posterior estimate
          self._compute_state_estimate()
          self.x_post = self.x.copy()
          self.P_post = self.P.copy()
docs: Add a new measurement (z) to the Kalman filter. If z is None, nothing
          is changed.
  
          Parameters
          ----------
  
          z : np.array
              measurement for this update.