code: def fetch_development_fmri(
      n_subjects=None,
      reduce_confounds=True,
      data_dir=None,
      resume=True,
      verbose=1,
      age_group="both",
  ):
      """Fetch movie watching based brain development dataset (fMRI).
  
      The data is downsampled to 4mm resolution for convenience
      with a repetition time (TR) of 2 secs.
      The origin of the data is coming from OpenNeuro. See Notes below.
  
      Please cite :footcite:t:`Richardson2018`
      if you are using this dataset.
  
      .. versionadded:: 0.5.2
  
      Parameters
      ----------
      n_subjects : :obj:`int`, optional
          The number of subjects to load. If None, all the subjects are
          loaded. Total 155 subjects.
  
      reduce_confounds : :obj:`bool`, default=True
          If True, the returned confounds only include 6 motion parameters,
          mean framewise displacement, signal from white matter, csf, and
          6 anatomical compcor parameters. This selection only serves the
          purpose of having realistic examples. Depending on your research
          question, other confounds might be more appropriate.
          If False, returns all :term:`fMRIPrep` confounds.
      %(data_dir)s
      %(resume)s
      %(verbose)s
      age_group : str, default='both'
          Which age group to fetch
  
          - 'adults' = fetch adults only (n=33, ages 18-39)
          - 'child' = fetch children only (n=122, ages 3-12)
          - 'both' = fetch full sample (n=155)
  
      Returns
      -------
      data : Bunch
          Dictionary-like object, the interest attributes are :
  
          - 'func': :obj:`list` of :obj:`str` (Nifti files)
              Paths to downsampled functional MRI data (4D) for each subject.
  
          - 'confounds': :obj:`list` of :obj:`str` (tsv files)
              Paths to confounds related to each subject.
  
          - 'phenotypic': numpy.ndarray
              Contains each subject age, age group, child or adult, gender,
              handedness.
  
      Notes
      -----
      The original data is downloaded from OpenNeuro
      https://openneuro.org/datasets/ds000228/versions/1.0.0
  
      This fetcher downloads downsampled data that are available on Open
      Science Framework (OSF). Located here: https://osf.io/5hju4/files/
  
      Preprocessing details: https://osf.io/wjtyq/
  
      Note that if n_subjects > 2, and age_group is 'both',
      fetcher will return a ratio of children and adults representative
      of the total sample.
  
      References
      ----------
      .. footbibliography::
  
      """
      dataset_name = "development_fmri"
      data_dir = get_dataset_dir(
          dataset_name, data_dir=data_dir, verbose=1
      )
      keep_confounds = [
          "trans_x",
          "trans_y",
          "trans_z",
          "rot_x",
          "rot_y",
          "rot_z",
          "framewise_displacement",
          "a_comp_cor_00",
          "a_comp_cor_01",
          "a_comp_cor_02",
          "a_comp_cor_03",
          "a_comp_cor_04",
          "a_comp_cor_05",
          "csf",
          "white_matter",
      ]
  
      # Dataset description
      fdescr = get_dataset_descr(dataset_name)
  
      # Participants data: ids, demographics, etc
      participants = _fetch_development_fmri_participants(
          data_dir=data_dir, url=None, verbose=verbose
      )
  
      (
          adult_count,
          child_count,
      ) = _filter_func_regressors_by_participants(
          participants, age_group
      )
      max_subjects = adult_count + child_count
  
      n_subjects = _set_invalid_n_subjects_to_max(
          n_subjects, max_subjects, age_group
      )
  
      # To keep the proportion of children versus adults
      percent_total = float(n_subjects) / max_subjects
      n_child = np.round(percent_total * child_count).astype(int)
      n_adult = np.round(percent_total * adult_count).astype(int)
  
      # We want to return adults by default (i.e., `age_group=both`) or
      # if explicitly requested.
      if (age_group != "child") and (n_subjects == 1):
          n_adult, n_child = 1, 0
  
      if (age_group == "both") and (n_subjects == 2):
          n_adult, n_child = 1, 1
  
      participants = _filter_csv_by_n_subjects(
          participants, n_adult, n_child
      )
  
      funcs, regressors = _fetch_development_fmri_functional(
          participants,
          data_dir=data_dir,
          url=None,
          resume=resume,
          verbose=verbose,
      )
  
      if reduce_confounds:
          regressors = _reduce_confounds(regressors, keep_confounds)
      return Bunch(
          func=funcs,
          confounds=regressors,
          phenotypic=participants,
          description=fdescr,
      )
  
imports: import fnmatch
  import glob
  import json
  import numbers
  import os
  import re
  import warnings
  from io import BytesIO
  from pathlib import Path
  import nibabel
  import nibabel
  import numpy
  import pandas
  from scipy.io import loadmat
  from sklearn.utils import Bunch
  from nilearn.image import get_data
  from .._utils import check_niimg, fill_doc
  from .._utils.numpy_conversions import csv_to_array
  from ._utils import fetch_files, fetch_single_file, filter_columns, get_dataset_descr, get_dataset_dir, read_md5_sum_file, tree, uncompress_file
label_desc: Use image node_id 17 for calling a global function with example usage: fetch_development_fmri(n_subjects, reduce_confounds, data_dir, resume, verbose, age_group) and returns: Bunch