code: def test_generate_fake_fmri(
      shape, length, kind, n_block, block_size, block_type, rng
  ):
      fake_fmri = generate_fake_fmri(
          shape=shape,
          length=length,
          kind=kind,
          n_blocks=n_block,
          block_size=block_size,
          block_type=block_type,
          random_state=rng,
      )
  
      assert fake_fmri[0].shape[:-1] == shape
      assert fake_fmri[0].shape[-1] == length
      if n_block is not None:
          assert fake_fmri[2].size == length
  
imports: from __future__ import annotations
  import json
  import numpy
  import pytest
  from nilearn._utils.data_gen import add_metadata_to_bids_dataset, create_fake_bids_dataset, generate_fake_fmri, generate_labeled_regions, generate_maps, generate_regions_ts
  from nilearn.image import get_data
label_desc: Use image node_id 19 for calling a global function with example usage: test_generate_fake_fmri(shape, length, kind, n_block, block_size, block_type, rng) without return types