code: def results(self, Snwp):
          r
          net = self.project.network
          P12 = net['throat.conns']
          # Fetch void volume for pores and throats
          Vp = net[self.settings['pore_volume']]
          Vt = net[self.settings['throat_volume']]
          # Fetch the order of filling
          Np = self['pore.invasion_sequence']
          Nt = self['throat.invasion_sequence']
          # Create Nt-long mask of which pores were filled when throat was filled
          Pinv = (Np[P12].T == Nt).T
          # If a pore and throat filled together, find combined volume
          Vinv = sp.vstack(((Pinv*Vp[P12]).T, Vt)).T
          Vinv = sp.sum(Vinv, axis=1)
          # Convert to cumulative volume filled as each throat is invaded
          x = sp.argsort(Nt)  # Find order throats were invaded
          Vinv_cum = np.cumsum(Vinv[x])
          # Normalized cumulative volume filled into saturation
          S = Vinv_cum/(Vp.sum() + Vt.sum())
          # Find throat invasion step where Snwp was reached
          try:
              N = sp.where(S < Snwp)[0][-1]
          except:
              N = -np.inf
          data = {'pore.occupancy': Np <= N, 'throat.occupancy': Nt <= N}
          return data
docs: r"""
          Returns the phase configuration at the specified non-wetting phase
          (invading phase) saturation.
  
          Parameters
          ----------
          Snwp : scalar, between 0 and 1
              The network saturation for which the phase configuration is
              desired.
  
          Returns
          -------
          Two dictionary containing arrays that describe the pore and throat
          distribution at the given saturation.  Specifically, these are:
  
          **'pore.occupancy'** : 1 indicates the pores is invaded and 0
          otherwise.
  
          **'throat.occupancy'** : Same as described above but for throats.