code: def testMinCutWithSourceAndTarget(self):
      g = self.constructSimpleGraph()
      mc = g.mincut(0, 3, "capacity")
      self.assertTrue(isinstance(mc, Cut))
      self.assertTrue(mc.cut == [3, 4])
      self.assertTrue(mc.value == 4)
      self.assertTrue(
          set(mc.partition[0]).union(mc.partition[1])
          == set(range(g.vcount()))
      )
      mc = g.mincut(0, 3)
      self.assertTrue(isinstance(mc, Cut))
      self.assertTrue(mc.cut == [3, 4])
      self.assertTrue(mc.value == 2)
      mc = g.mincut(2, 0, "capacity")
      self.assertTrue(isinstance(mc, Cut))
      self.assertTrue(mc.cut == [0, 1])
      self.assertTrue(mc.value == 6)
      self.assertRaises(ValueError, g.mincut, 2, capacity="capacity")
  
imports: import unittest
  from igraph import Cut, Graph, EdgeSeq, InternalError
  from itertools import combinations
  from random import randint
label_desc: Use image node_id 5 for calling the CutTests obj's underlying member method code with example usage: obj.testMinCutWithSourceAndTarget() without return types