docs: def simplex_select_entering_arc(self, t, pivot):
          '''
          API:
              simplex_select_entering_arc(self, t, pivot)
          Description:
              Decides and returns entering arc using pivot rule.
          Input:
              t: current spanning tree solution
              pivot: May be one of the following; 'first_eligible' or 'dantzig'.
              'dantzig' is the default value.
          Return:
              Returns entering arc tuple (k,l)
          '''
          if pivot=='dantzig':
              # pick the maximum violation
              candidate = {}
              for e in self.edge_attr:
                  if e in t.edge_attr:
                      continue
                  flow_ij = self.edge_attr[e]['flow']
                  potential_i = self.get_node(e[0]).get_attr('potential')
                  potential_j = self.get_node(e[1]).get_attr('potential')
                  capacity_ij = self.edge_attr[e]['capacity']
                  c_ij = self.edge_attr[e]['cost']
                  cpi_ij = c_ij - potential_i + potential_j
                  if flow_ij==0:
                      if cpi_ij < 0:
                          candidate[e] = cpi_ij
                  elif flow_ij==capacity_ij:
                      if cpi_ij > 0:
                          candidate[e] = cpi_ij
              for e in candidate:
                  max_c = e
                  max_v = abs(candidate[e])
                  break
              for e in candidate:
                  if max_v < abs(candidate[e]):
                      max_c = e
                      max_v = abs(candidate[e])
          elif pivot=='first_eligible':
              # pick the first eligible
              for e in self.edge_attr:
                  if e in t.edge_attr:
                      continue
                  flow_ij = self.edge_attr[e]['flow']
                  potential_i = self.get_node(e[0]).get_attr('potential')
                  potential_j = self.get_node(e[1]).get_attr('potential')
                  capacity_ij = self.edge_attr[e]['capacity']
                  c_ij = self.edge_attr[e]['cost']
                  cpi_ij = c_ij - potential_i + potential_j
                  if flow_ij==0:
                      if cpi_ij < 0:
                          max_c = e
                          max_v = abs(cpi_ij)
                  elif flow_ij==capacity_ij:
                      if cpi_ij > 0:
                          max_c = e
                          max_v = cpi_ij
          else:
              raise Exception("Unknown pivot rule.")
          return max_c