docs: def cycle_canceling(self, display):
          '''
          API:
              cycle_canceling(self, display)
          Description:
              Solves minimum cost feasible flow problem using cycle canceling
              algorithm. Returns True when an optimal solution is found, returns
              False otherwise. 'flow' attribute values of arcs should be
              considered as junk when returned False.
          Input:
              display: Display method.
          Pre:
              (1) Arcs should have 'capacity' and 'cost' attribute.
              (2) Nodes should have 'demand' attribute, this value should be
              positive if the node is a supply node, negative if it is demand
              node and 0 if it is transhipment node.
              (3) graph should not have node 's' and 't'.
          Post:
              Changes 'flow' attributes of arcs.
          Return:
              Returns True when an optimal solution is found, returns False
              otherwise.
          '''
          # find a feasible solution to flow problem
          if not self.find_feasible_flow():
              return False
          # create residual graph
          residual_g = self.create_residual_graph()
          # identify a negative cycle in residual graph
          ncycle = residual_g.get_negative_cycle()
          # loop while residual graph has a negative cycle
          while ncycle is not None:
              # find capacity of cycle
              cap = residual_g.find_cycle_capacity(ncycle)
              # augment capacity amount along the cycle
              self.augment_cycle(cap, ncycle)
              # create residual graph
              residual_g = self.create_residual_graph()
              # identify next negative cycle
              ncycle = residual_g.get_negative_cycle()
          return True