class_docstr: Generic data structure representing a directed graph with multiple edges.
docstr: Removes a node from the graph and all edges connected to it.
docstr_tok: ["Removes","a","node","from","the","graph","and","all","edges","connected","to","it","."]
code: def remove_node(self, key: KT) -> None:
      """Removes a node from the graph and all edges connected to it."""
      # remove edges starting from node
      if key in self._adjacency_dict:
          del self._adjacency_dict[key]
  
      # remove all edges that terminate at the removed node
      for to_dict in self._adjacency_dict.values():
          for to_key in list(to_dict.keys()):
              if to_key == key:
                  del to_dict[to_key]
  
file_path: metricflow/metricflow/model/graph.py
imports: from __future__ import annotations
  from typing import Dict, Generic, List, Tuple, TypeVar
label_desc: Use image node_id 4 for calling the MultiDiGraph obj's underlying member method code with example usage: obj.remove_node(key) without return types