code: def _make_edge_getter_fn(
      ds_info: dataset_info.DatasetInfo,
  ) -> _GraphFn:
      """Returns a function which will extract edges from each graph."""
      graph_viz_metadata = _extract_metadata_dict(ds_info.metadata)
      edgelist_feature_name = graph_viz_metadata[
          "edgelist_feature_name"
      ]
  
      def get_edges_fn(graph):
          return graph[edgelist_feature_name].numpy()
  
      return get_edges_fn
  
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 2 for calling a global function with example usage: _make_edge_getter_fn(ds_info) and returns: get_edges_fn, graph