code: def fetch_mixed_gambles(
      n_subjects=1,
      data_dir=None,
      url=None,
      resume=True,
      return_raw_data=False,
      verbose=1,
  ):
      """Fetch Jimura "mixed gambles" dataset.
  
      See :footcite:t:`Jimura2012`.
  
      Parameters
      ----------
      n_subjects : :obj:`int`, default=1
          The number of subjects to load. If ``None`` is given, all the
          subjects are used.
      %(data_dir)s
      %(url)s
      %(resume)s
      %(verbose)s
      return_raw_data : :obj:`bool`, default=False
          If ``False``, then the data will transformed into an ``(X, y)``
          pair, suitable for machine learning routines. ``X`` is a list
          of ``n_subjects * 48`` :class:`~nibabel.nifti1.Nifti1Image`
          objects (where 48 is the number of trials), and ``y`` is an
          array of shape ``(n_subjects * 48,)``.
  
      Returns
      -------
      data : :class:`~sklearn.utils.Bunch`
          Dictionary-like object, the attributes of interest are:
  
          - 'zmaps': :obj:`list` of :obj:`str`
            Paths to realigned gain betamaps (one nifti per subject).
          - 'gain': :obj:`list` of :class:`~nibabel.nifti1.Nifti1Image` \
          or ``None``
            If ``make_Xy`` is ``True``, this is a list of
            ``n_subjects * 48`` :class:`~nibabel.nifti1.Nifti1Image`
            objects, else it is ``None``.
          - 'y': :class:`~numpy.ndarray` of shape ``(n_subjects * 48,)`` \
          or ``None``
            If ``make_Xy`` is ``True``, then this is a
            :class:`~numpy.ndarray` of shape ``(n_subjects * 48,)``,
            else it is ``None``.
          - 'description': data description
  
      References
      ----------
      .. footbibliography::
  
      """
      if n_subjects > 16:
          warnings.warn("Warning: there are only 16 subjects!")
          n_subjects = 16
      if url is None:
          url = (
              "https://www.nitrc.org/frs/download.php/7229/"
              "jimura_poldrack_2012_zmaps.zip"
          )
      opts = dict(uncompress=True)
      files = [
          (f"zmaps{os.sep}sub{int(j + 1):03}_zmaps.nii.gz", url, opts)
          for j in range(n_subjects)
      ]
      data_dir = get_dataset_dir(
          "jimura_poldrack_2012_zmaps", data_dir=data_dir
      )
      zmap_fnames = fetch_files(
          data_dir, files, resume=resume, verbose=verbose
      )
      subject_id = np.repeat(np.arange(n_subjects), 6 * 8)
      description = get_dataset_descr("mixed_gambles")
      data = Bunch(
          zmaps=zmap_fnames,
          subject_id=subject_id,
          description=description,
      )
      if not return_raw_data:
          X, y, mask_img = _load_mixed_gambles(
              check_niimg(data.zmaps, return_iterator=True)
          )
          data.zmaps, data.gain, data.mask_img = X, y, mask_img
      return data
  
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 11 for calling a global function with example usage: fetch_mixed_gambles(n_subjects, data_dir, url, resume, return_raw_data, verbose) and returns: data