code: def test_fake_bids_errors(tmp_path):
      with pytest.raises(ValueError, match="labels.*alphanumeric"):
          create_fake_bids_dataset(
              base_dir=tmp_path,
              n_sub=1,
              n_ses=1,
              tasks=["foo_bar"],
              n_runs=[1],
          )
  
      with pytest.raises(ValueError, match="labels.*alphanumeric"):
          create_fake_bids_dataset(
              base_dir=tmp_path,
              n_sub=1,
              n_ses=1,
              tasks=["main"],
              n_runs=[1],
              entities={"acq": "foo_bar"},
          )
  
      with pytest.raises(ValueError, match="number.*tasks.*runs.*same"):
          create_fake_bids_dataset(
              base_dir=tmp_path,
              n_sub=1,
              n_ses=1,
              tasks=["main"],
              n_runs=[1, 2],
          )
  
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 11 for calling a global function with example usage: test_fake_bids_errors(tmp_path) without return types