code: def _get_cuts(transition, direction):
      
      n = transition.network.size
  
      if direction is Direction.BIDIRECTIONAL:
          yielded = set()
          for cut in chain(_get_cuts(transition, Direction.CAUSE),
                           _get_cuts(transition, Direction.EFFECT)):
              cm = utils.np_hashable(cut.cut_matrix(n))
              if cm not in yielded:
                  yielded.add(cm)
                  yield cut
  
      else:
          mechanism = transition.mechanism_indices(direction)
          purview = transition.purview_indices(direction)
          for partition in mip_partitions(mechanism, purview,
                                          transition.node_labels):
              yield ActualCut(direction, partition, transition.node_labels)
docs: A list of possible cuts to a transition.