code: def test_outofrange_integers(self, tmp_path):
      # GML restricts integers to 32 signed bits.
      # Check that we honor this restriction on export
      G = nx.Graph()
      # Test export for numbers that barely fit or don't fit into 32 bits,
      # and 3 numbers in the middle
      numbers = {
          "toosmall": (-(2**31)) - 1,
          "small": -(2**31),
          "med1": -4,
          "med2": 0,
          "med3": 17,
          "big": (2**31) - 1,
          "toobig": 2**31,
      }
      G.add_node("Node", **numbers)
  
      fname = tmp_path / "test.gml"
      nx.write_gml(G, fname)
      # Check that the export wrote the nonfitting numbers as strings
      G2 = nx.read_gml(fname)
      for attr, value in G2.nodes["Node"].items():
          if attr == "toosmall" or attr == "toobig":
              assert type(value) == str
          else:
              assert type(value) == int
  
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 18 for calling the TestGraph obj's underlying member method code with example usage: obj.test_outofrange_integers(tmp_path) without return types