code: def _extract_metadata_dict(
      metadata: Optional[dataset_info.Metadata],
  ) -> Optional[GraphVisualizerMetadataDict]:
      """Extracts out the metadata dict for the GraphVisualizer."""
      if metadata is None:
          return None
  
      for metadata_entry in metadata.values():
          for key in metadata_entry:
              if key == "edgelist_feature_name":
                  return metadata_entry
      return None
  
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 1 for calling a global function with example usage: _extract_metadata_dict(metadata) and returns: None, None, metadata_entry