code: def test_graph_types(self):
      for directed in [None, False, True]:
          for multigraph in [None, False, True]:
              gml = "graph ["
              if directed is not None:
                  gml += " directed " + str(int(directed))
              if multigraph is not None:
                  gml += " multigraph " + str(int(multigraph))
              gml += ' node [ id 0 label "0" ]'
              gml += " edge [ source 0 target 0 ]"
              gml += " ]"
              G = nx.parse_gml(gml)
              assert bool(directed) == G.is_directed()
              assert bool(multigraph) == G.is_multigraph()
              gml = "graph [\n"
              if directed is True:
                  gml += "  directed 1\n"
              if multigraph is True:
                  gml += "  multigraph 1\n"
              gml += """  node [
      id 0
      label "0"
    ]
    edge [
      source 0
      target 0
  """
              if multigraph:
                  gml += "    key 0\n"
              gml += "  ]\n]"
              assert gml == "\n".join(nx.generate_gml(G))
  
imports: import codecs
  import io
  import math
  from ast import literal_eval
  from contextlib import contextmanager
  from textwrap import dedent
  import pytest
  import networkx
  from networkx.readwrite.gml import literal_destringizer, literal_stringizer
label_desc: Use image node_id 13 for calling the TestGraph obj's underlying member method code with example usage: obj.test_graph_types() without return types