docs: def convert_to_networkx_graph(data, create_using=None, multigraph_input=False):
      """Convert an AllegedGraph to the corresponding NetworkX graph type."""
      if isinstance(data, AllegedGraph):
          result = networkx.convert.from_dict_of_dicts(
              data.adj,
              create_using=create_using,
              multigraph_input=data.is_multigraph()
          )
          result.graph = dict(data.graph)
          result.node = {k: dict(v) for k, v in data.node.items()}
          return result
      return networkx.convert.to_networkx_graph(
          data, create_using, multigraph_input
      )