code: def simple_est_prec(data, freq_min=0.0, freq_max=1.0, n_particles=6000, return_all=False):
      
      model = BinomialModel(SimplePrecessionModel(freq_min))
      prior = UniformDistribution([0, freq_max])
  
      data = load_data_or_txt(data, [
          ('counts', 'uint'),
          ('t', float),
          ('n_shots', 'uint')
      ])
  
      outcomes, expparams = data_to_params(data,
          model.expparams_dtype,
          cols_expparams={
              'x': (1, 't'),
              'n_meas': (2, 'n_shots')
          }
      )
  
      return do_update(
          model, n_particles, prior, outcomes, expparams,
          return_all
      )
docs: Estimates a simple precession (cos²) from experimental data.
      Note that this model is mainly for testing purposes, as it does not
      consider the phase or amplitude of precession, leaving only the frequency.
  
      :param data: Data to be used in estimating the precession frequency.
      :type data: see :ref:`simple_est_data_arg`
      :param float freq_min: The minimum feasible frequency to consider.
      :param float freq_max: The maximum feasible frequency to consider.
      :param int n_particles: The number of particles to be used in estimating
          the precession frequency.
      :param bool return_all: Controls whether additional return
          values are provided, such as the updater.
  
      :column counts (int): How many counts were observed at the sampled
          time.
      :column t (float): The evolutions time at which the samples
          were collected.
      :column n_shots (int): How many samples were collected at the
          given evolution time.
  
      :return mean: Bayesian mean estimator for the precession frequency.
      :return var: Variance of the final posterior over frequency.
      :return extra: See :ref:`simple_est_extra_return`. Only returned
          if ``return_all`` is `True`.