code: def testMaxFlow(self):
      flow = self.g.maxflow(0, 3)
      self.assertEqual(flow.value, 2)
      self.assertEqual(flow.flow, [1, 1, 0, 1, 1])
  
      flow = self.g.maxflow(0, 3, "capacity")
      self.assertEqual(flow.value, 4)
      self.assertEqual(flow.cut, [3, 4])
      self.assertEqual([e.index for e in flow.es], [3, 4])
      self.assertTrue(
          set(flow.partition[0]).union(flow.partition[1])
          == set(range(self.g.vcount()))
      )
  
      self.assertRaises(KeyError, self.g.maxflow, 0, 3, "unknown")
  
imports: import unittest
  from igraph import Cut, Graph, EdgeSeq, InternalError
  from itertools import combinations
  from random import randint
label_desc: Use image node_id 6 for calling the MaxFlowTests obj's underlying member method code with example usage: obj.testMaxFlow() without return types