code: def _schaefer_img(match, requests):
      # fails if requests is not passed
      info = match.groupdict()
      shape = (15, 14, 13)
      affine = np.eye(4) * float(info["res"])
      affine[3, 3] = 1.0
      img = data_gen.generate_labeled_regions(
          shape, int(info["n_rois"]), affine=affine
      )
      return serialize_niimg(img)
  
imports: import itertools
  import os
  import re
  from pathlib import Path
  import nibabel
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_array_equal
  from nilearn._utils import data_gen
  from nilearn._utils.testing import serialize_niimg
  from nilearn.conftest import _rng
  from nilearn.datasets import atlas
  from nilearn.datasets._utils import fetch_files
  from nilearn.datasets.tests._testing import dict_to_archive
  from nilearn.image import get_data
label_desc: Use image node_id 31 for calling a global function with example usage: _schaefer_img(match, requests) and returns: serialize_niimg