code: def test_encode(dtype):
      """Test base64 encoding/decoding for different dtypes."""
      a = np.arange(10, dtype=dtype)
      encoded = encode(a)
      decoded = base64.b64decode(encoded.encode("utf-8"))
      b = np.frombuffer(decoded, dtype=dtype)
      assert np.allclose(decode(encoded, dtype=dtype), b)
      assert np.allclose(a, b)
  
imports: import base64
  import os
  import re
  import tempfile
  import numpy
  import pytest
  from nilearn.datasets import fetch_surf_fsaverage
  from nilearn.plotting.js_plotting_utils import add_js_lib, colorscale, decode, encode, get_html_template, mesh_to_plotly, to_color_strings
  from nilearn.surface import load_surf_mesh
label_desc: Use image node_id 10 for calling a global function with example usage: test_encode(dtype) without return types