code: def is_percolating(self, applied_pressure):
          r
          if np.sum(self['pore.inlets']) == 0:
              raise Exception('Inlet pores must be specified first')
          else:
              Pin = self['pore.inlets']
          if np.sum(self['pore.outlets']) == 0:
              raise Exception('Outlet pores must be specified first')
          else:
              Pout = self['pore.outlets']
          # Do a simple check of pressures on the outlet pores first...
          if np.amin(self['pore.invasion_pressure'][Pout]) > applied_pressure:
              val = False
          else:  # ... and do a rigorous check only if necessary
              mask = self['throat.invasion_pressure'] < applied_pressure
              am = self.project.network.create_adjacency_matrix(weights=mask,
                                                                fmt='coo')
              val = ispercolating(am=am, mode=self.settings['mode'],
                                  inlets=Pin, outlets=Pout)
          return val
docs: r"""
          Returns a True or False value to indicate if a percolating cluster
          spans between the inlet and outlet pores that were specified at the
          given applied pressure.
  
          Parameters
          ----------
          applied_pressure : scalar, float
              The pressure at which percolation should be checked
  
          Returns
          -------
          A simple boolean True or False if percolation has occured or not.