code: def _make_panel(
      n_instances=20,
      n_columns=1,
      n_timepoints=20,
      y=None,
      all_positive=False,
      random_state=None,
      return_mtype="pd-multiindex",
  ):
      """Generate sktime compatible test data, Panel data formats.
  
      Parameters
      ----------
      n_instances : int, optional, default=20
          number of instances per series in the panel
      n_columns : int, optional, default=1
          number of variables in the time series
      n_timepoints : int, optional, default=20
          number of time points in each series
      y : None (default), or 1D np.darray or 1D array-like, shape (n_instances, )
          if passed, return will be generated with association to y
      all_positive : bool, optional, default=False
          whether series contain only positive values when generated
      random_state : None (default) or int
          if int is passed, will be used in numpy RandomState for generation
      return_mtype : str, sktime Panel mtype str, default="pd-multiindex"
          see sktime.datatypes.MTYPE_LIST_PANEL for a full list of admissible strings
          see sktime.datatypes.MTYPE_REGISTER for an short explanation of formats
          see examples/AA_datatypes_and_datasets.ipynb for a full specification
  
      Returns
      -------
      X : an sktime time series data container of mtype return_mtype
          with n_instances instances, n_columns variables, n_timepoints time points
          generating distribution is all values i.i.d. normal with std 0.5
          if y is passed, i-th series values are additively shifted by y[i] * 100
      """
      # If target variable y is given, we ignore n_instances and instead generate as
      # many instances as in the target variable
      if y is not None:
          y = np.asarray(y)
          n_instances = len(y)
      rng = check_random_state(random_state)
  
      # Generate data as 3d numpy array
      X = rng.normal(
          scale=0.5, size=(n_instances, n_columns, n_timepoints)
      )
  
      # Generate association between data and target variable
      if y is not None:
          X = X + (y * 100).reshape(-1, 1, 1)
  
      if all_positive:
          X = X**2
  
      X = convert(X, from_type="numpy3D", to_type=return_mtype)
      return X
  
file_path: sktime/sktime/utils/_testing/panel.py
imports: import numpy
  import pandas
  from sklearn.utils.validation import check_random_state
  from sktime.datatypes import convert
label_desc: Use image node_id 1 for calling a global function with example usage: _make_panel(n_instances, n_columns, n_timepoints, y, all_positive, random_state, return_mtype) and returns: X