code: def testDIMACS(self):
      with temporary_file(
          """\
          c
          c        This is a simple example file to demonstrate the
          c     DIMACS input file format for minimum-cost flow problems.
          c
          c problem line :
          p max 4 5
          c
          c node descriptor lines :
          n 1 s
          n 4 t
          c
          c arc descriptor lines :
          a 1 2 4
          a 1 3 2
          a 2 3 2
          a 2 4 3
          a 3 4 5
          """
      ) as tmpfname:
          graph = Graph.Read_DIMACS(tmpfname, False)
          self.assertTrue(isinstance(graph, Graph))
          self.assertTrue(graph.vcount() == 4 and graph.ecount() == 5)
          self.assertTrue(graph["source"] == 0 and graph["target"] == 3)
          self.assertTrue(graph.es["capacity"] == [4, 2, 2, 3, 5])
          graph.write_dimacs(tmpfname)
  
imports: import gzip
  import io
  import unittest
  import warnings
  from igraph import Graph, InternalError
  from .utils import temporary_file
label_desc: Use image node_id 1 for calling the ForeignTests obj's underlying member method code with example usage: obj.testDIMACS() without return types