code: def _make_node_color_mapper(
      node_color_map: _NodeColorDict, default_color: str = "C0"
  ) -> _NodeColorFn:
      """Helper to map nodes to colors."""
  
      def node_color_mapper(node):
          return node_color_map.get(node, default_color)
  
      return node_color_mapper
  
file_path: datasets/tensorflow_datasets/core/visualization/graph_visualizer.py
imports: from __future__ import annotations
  from typing import Any, Callable, Dict, Optional, Union
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.core.visualization import visualizer
label_desc: Use image node_id 3 for calling a global function with example usage: _make_node_color_mapper(node_color_map, default_color) and returns: node_color_mapper, node_color_map