code: def _rm_all_json_files_from_bids_dataset(bids_path):
      """Remove all json and make sure that get_bids_files does not find any."""
      [x.unlink() for x in bids_path.glob("**/*.json")]
      selection = get_bids_files(
          bids_path, file_type="json", sub_folder=True
      )
      assert selection == []
      selection = get_bids_files(
          bids_path, file_type="json", sub_folder=False
      )
      assert selection == []
  
imports: import json
  import os
  import numpy
  import pandas
  import pytest
  from nilearn._utils.data_gen import add_metadata_to_bids_dataset, create_fake_bids_dataset, generate_fake_fmri_data_and_design
  from nilearn.glm.first_level import FirstLevelModel
  from nilearn.glm.second_level import SecondLevelModel
  from nilearn.interfaces.bids import get_bids_files, parse_bids_filename, save_glm_to_bids
  from nilearn.interfaces.bids.query import _get_metadata_from_bids, infer_repetition_time_from_dataset, infer_slice_timing_start_time_from_dataset
  from nilearn.maskers import NiftiMasker
label_desc: Use image node_id 4 for calling a global function with example usage: _rm_all_json_files_from_bids_dataset(bids_path) without return types