code: def test_fetch_development_fmri(tmp_path, request_mocker):
      mock_participants = _mock_participants_data()
      request_mocker.url_mapping[
          "*"
      ] = _mock_development_confounds().to_csv(index=False, sep="\t")
      request_mocker.url_mapping[
          "https://osf.io/yr3av/download"
      ] = mock_participants.to_csv(index=False, sep="\t")
  
      data = func.fetch_development_fmri(
          n_subjects=2, data_dir=tmp_path, verbose=1
      )
  
      assert len(data.func) == 2
      assert len(data.confounds) == 2
      assert isinstance(data.phenotypic, np.ndarray)
      assert data.phenotypic.shape == (2,)
      assert data.description != ""
  
      # check reduced confounds
      confounds = np.genfromtxt(data.confounds[0], delimiter="\t")
  
      assert len(confounds[0]) == 15
  
      # check full confounds
      data = func.fetch_development_fmri(
          n_subjects=2, reduce_confounds=False, verbose=1
      )
      confounds = np.genfromtxt(data.confounds[0], delimiter="\t")
  
      assert len(confounds[0]) == 28
  
      # check first subject is an adult
      data = func.fetch_development_fmri(
          n_subjects=1, reduce_confounds=False, verbose=1
      )
      age_group = data.phenotypic["Child_Adult"][0]
  
      assert age_group == "adult"
  
      # check first subject is an child if requested with age_group
      data = func.fetch_development_fmri(
          n_subjects=1,
          reduce_confounds=False,
          verbose=1,
          age_group="child",
      )
      age_group = data.phenotypic["Child_Adult"][0]
  
      assert age_group == "child"
  
      # check one of each age group returned if n_subject == 2
      # and age_group == 'both
      data = func.fetch_development_fmri(
          n_subjects=2,
          reduce_confounds=False,
          verbose=1,
          age_group="both",
      )
      age_group = data.phenotypic["Child_Adult"]
  
      assert all(age_group == ["adult", "child"])
  
      # check age_group
      data = func.fetch_development_fmri(
          n_subjects=2,
          reduce_confounds=False,
          verbose=1,
          age_group="child",
      )
  
      assert all(x == "child" for x in data.phenotypic["Child_Adult"])
  
imports: import json
  import os
  import re
  import shutil
  import tempfile
  import uuid
  from collections import OrderedDict
  from pathlib import Path
  import nibabel
  import numpy
  import pandas
  import pytest
  from nilearn.datasets import func
  from nilearn.datasets._utils import get_dataset_dir
  from nilearn.datasets.tests._testing import dict_to_archive, list_to_archive
  from nilearn.image import load_img
label_desc: Use image node_id 25 for calling a global function with example usage: test_fetch_development_fmri(tmp_path, request_mocker) without return types