code: def create_data(shape, missing_values=False, p=0.15, mult=10):
      """Create random ndarray of shape `shape`.
  
      The result array will contain missing values (represented by np.nan) if parameter
      `missing_values` is set to true.
      """
      if isinstance(shape, int):
          shape = (shape,)
      data = np.random.rand(*shape) * mult
  
      if missing_values:
          time_steps = shape[0]
          measurement_dim = shape[1]
          pr = max(int(time_steps * p), 4)
          for t in range(time_steps):
              if t % pr == 0:
                  data[t] = [np.nan] * measurement_dim
      return data
  
file_path: sktime/sktime/transformations/series/tests/test_kalman_filter.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from sktime.transformations.series.kalman_filter import KalmanFilterTransformerFP, KalmanFilterTransformerPK
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 1 for calling a global function with example usage: create_data(shape, missing_values, p, mult) and returns: data