code: def generate_timeseries(n_timepoints, n_features, random_state=0):
      """Generate some random timeseries.
  
      Parameters
      ----------
      n_timepoints : :obj:`int`
          Number of timepoints
  
      n_features : :obj:`int`
          Number of features
  
      random_state : :obj:`int` or :obj:`numpy.random.RandomState` instance, \
                     default=0
          Random number generator, or seed.
  
      Returns
      -------
      :obj:`numpy.ndarray` of shape (n_timepoints, n_features)
          Generated time series.
  
      """
      rand_gen = np.random.default_rng(random_state)
      return rand_gen.standard_normal((n_timepoints, n_features))
  
imports: from __future__ import annotations
  import itertools
  import json
  import string
  from pathlib import Path
  import numpy
  import pandas
  import scipy.linalg
  import scipy.signal
  from nibabel import Nifti1Image
  from scipy.ndimage import binary_dilation
  from nilearn import datasets, image, maskers, masking
  from nilearn._utils import as_ndarray, logger
  from nilearn.interfaces.bids.utils import bids_entities, check_bids_label, create_bids_filename
  from nilearn.interfaces.fmriprep.tests._testing import get_legal_confound
label_desc: Use image node_id 2 for calling a global function with example usage: generate_timeseries(n_timepoints, n_features, random_state) and returns: rand_gen