code: def _encode_coordinates(coords, prefix):
      """Transform a 2D-array of 3D data (x, y, z) into a dict of base64 values.
  
      Parameters
      ----------
      coords : ndarray, shape=(n_nodes, 3)
          The coordinates of the nodes in MNI space.
  
      prefix : str
          Prefix for the key value in the returned dict.
          Schema is {prefix}{x|y|z}
  
      Returns
      -------
      coordinates : dict
          Dictionary containing base64 values for each axis
      """
      coordinates = {}
  
      coords = np.asarray(coords, dtype="<f4")
      marker_x, marker_y, marker_z = coords.T
      for coord, cname in [
          (marker_x, "x"),
          (marker_y, "y"),
          (marker_z, "z"),
      ]:
          coordinates[f"{prefix}{cname}"] = encode(
              np.asarray(coord, dtype="<f4")
          )
  
      return coordinates
  
file_path: nilearn/nilearn/plotting/html_connectome.py
imports: import json
  import numpy
  from matplotlib import cm
  from scipy import sparse
  from nilearn.plotting.html_document import HTMLDocument
  from ..None import datasets
  from .None import cm
  from .js_plotting_utils import add_js_lib, colorscale, encode, get_html_template, mesh_to_plotly, to_color_strings
label_desc: Use image node_id 1 for calling a global function with example usage: _encode_coordinates(coords, prefix) and returns: coordinates