docs: def find_mip(self, direction, mechanism, purview):
          """Return the minimum information partition for a mechanism over a
          purview.
  
          Args:
              direction (Direction): |CAUSE| or |EFFECT|.
              mechanism (tuple[int]): The nodes in the mechanism.
              purview (tuple[int]): The nodes in the purview.
  
          Returns:
              RepertoireIrreducibilityAnalysis: The irreducibility analysis for
              the mininum-information partition in one temporal direction.
          """
          if not purview:
              return _null_ria(direction, mechanism, purview)
  
          # Calculate the unpartitioned repertoire to compare against the
          # partitioned ones.
          repertoire = self.repertoire(direction, mechanism, purview)
  
          def _mip(phi, partition, partitioned_repertoire):
              # Prototype of MIP with already known data
              # TODO: Use properties here to infer mechanism and purview from
              # partition yet access them with `.mechanism` and `.purview`.
              return RepertoireIrreducibilityAnalysis(
                  phi=phi,
                  direction=direction,
                  mechanism=mechanism,
                  purview=purview,
                  partition=partition,
                  repertoire=repertoire,
                  partitioned_repertoire=partitioned_repertoire,
                  node_labels=self.node_labels
              )
  
          # State is unreachable - return 0 instead of giving nonsense results
          if (direction == Direction.CAUSE and
                  np.all(repertoire == 0)):
              return _mip(0, None, None)
  
          mip = _null_ria(direction, mechanism, purview, phi=float('inf'))
  
          for partition in mip_partitions(mechanism, purview, self.node_labels):
              # Find the distance between the unpartitioned and partitioned
              # repertoire.
              phi, partitioned_repertoire = self.evaluate_partition(
                  direction, mechanism, purview, partition,
                  repertoire=repertoire)
  
              # Return immediately if mechanism is reducible.
              if phi == 0:
                  return _mip(0.0, partition, partitioned_repertoire)
  
              # Update MIP if it's more minimal.
              if phi < mip.phi:
                  mip = _mip(phi, partition, partitioned_repertoire)
  
          return mip