code: def _prepare_markers_metadata(
      coords, marker_size, marker_color, marker_only
  ):
      markers_coordinates = _encode_coordinates(
          coords, prefix="_marker_"
      )
      markers_metadata = {
          "markers_only": marker_only,
          **markers_coordinates,
      }
  
      if np.ndim(marker_size) > 0:
          marker_size = np.asarray(marker_size)
      if hasattr(marker_size, "tolist"):
          marker_size = marker_size.tolist()
      markers_metadata["marker_size"] = marker_size
      markers_metadata["marker_color"] = _prepare_colors_for_markers(
          marker_color,
          len(coords),
      )
  
      return markers_metadata
  
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 5 for calling a global function with example usage: _prepare_markers_metadata(coords, marker_size, marker_color, marker_only) and returns: markers_metadata