class_docstr: A json encoder that can handle numpy objects
class_docstr_tok: ["A","json","encoder","that","can","handle","numpy","objects"]
code: def default(self, obj):
      if hasattr(obj, "tolist"):
          return obj.tolist()
      return json.JSONEncoder.default(self, obj)
  
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 1 for calling the _NumpyJsonEncoder obj's underlying member method code with example usage: obj.default(obj) and returns: json, obj