code: def _neurovault_images(parts, query):
      """Mocks the Neurovault API behind the `/api/images/` path.
  
      parts: parts of the URL path after "images",
        ie [] or ["<someimageid>"]
  
      query: the parsed query string, e.g. {"offset": "15", "limit": "5"}
  
      returns a dictionary of API results
  
      See the neurovault API docs for details: https://neurovault.org/api-docs
  
      """
      if parts:
          return _neurovault_one_image(parts[0])
      _, images = _get_neurovault_data()
      offset, limit = int(query.get("offset", 0)), int(
          query.get("limit", 2)
      )
      batch = images.iloc[offset : offset + limit].to_dict(
          orient="records"
      )
      return {"count": len(images), "results": batch}
  
imports: import hashlib
  import json
  import os
  import re
  import stat
  from urllib import parse
  import numpy
  import pandas
  import pytest
  import requests
  from nilearn._utils.data_gen import generate_fake_fmri
  from nilearn.conftest import _rng
  from nilearn.datasets import neurovault
  from nilearn.image import load_img
label_desc: Use image node_id 5 for calling a global function with example usage: _neurovault_images(parts, query) and returns: dict, _neurovault_one_image