code: def create_data(kalman, true_init, true_inputs, obs_freq):
      """Create data for a specific example.
  
      Parameters
      ----------
      kalman : KalmanFilter
          Filter which will be used to estimate the state.
      true_init : array-like, shape=[dim]
          True initial state.
      true_inputs : list(array-like, shape=[dim_input])
          Noise-free inputs giving the evolution of the true state.
      obs_freq : int
          Number of time steps between observations.
  
      Returns
      -------
      true_traj : array-like, shape=[len(true_inputs), dim]
          Trajectory of the true state.
      inputs : list(array-like, shape=[dim_input])
          Simulated noisy inputs received by the sensor.
      observations : array-like, shape=[len(true_inputs)/obs_freq, dim_obs]
          Simulated noisy observations of the system.
      """
      true_traj = [1 * true_init]
      for incr in true_inputs:
          true_traj.append(kalman.model.propagate(true_traj[-1], incr))
      true_obs = [
          kalman.model.observation_model(pose)
          for pose in true_traj[obs_freq::obs_freq]
      ]
  
      obs_dtype = true_obs[0].dtype
      observations = gs.stack(
          [
              gs.array(
                  np.random.multivariate_normal(
                      obs, kalman.measurement_noise
                  ),
                  dtype=obs_dtype,
              )
              for obs in true_obs
          ]
      )
  
      input_dtype = true_inputs[0].dtype
      inputs = [
          gs.concatenate(
              [
                  incr[:1],
                  gs.array(
                      np.random.multivariate_normal(
                          incr[1:], kalman.process_noise
                      ),
                      dtype=input_dtype,
                  ),
              ],
              axis=0,
          )
          for incr in true_inputs
      ]
      inputs = [gs.cast(incr, input_dtype) for incr in inputs]
  
      return gs.array(true_traj), inputs, observations
  
imports: import matplotlib.pyplot
  import numpy
  import geomstats.backend
  from geomstats import algebra_utils
  from geomstats.learning.kalman_filter import KalmanFilter, Localization, LocalizationLinear
label_desc: Use image node_id 1 for calling a global function with example usage: create_data(kalman, true_init, true_inputs, obs_freq) and returns: gs,  inputs,  observations