code: def set_inlets(self, pores=None, clusters=None):
          r
          if pores is not None:
              logger.info("Setting inlet pores at shared pressure")
              clusters = []
              clusters.append(pores)
          elif clusters is not None:
              logger.info("Setting inlet clusters at individual pressures")
          else:
              logger.error("Either 'inlets' or 'clusters' must be passed to" +
                           " setup method")
          self.queue = []
          for i, cluster in enumerate(clusters):
              self.queue.append([])
              # Perform initial analysis on input pores
              self['pore.invasion_sequence'][cluster] = 0
              self['pore.cluster'][cluster] = i
              self['pore.invasion_pressure'][cluster] = -np.inf
              if np.size(cluster) > 1:
                  for elem_id in cluster:
                      self._add_ts2q(elem_id, self.queue[i])
              elif np.size(cluster) == 1:
                  self._add_ts2q(cluster, self.queue[i])
              else:
                  logger.warning("Some inlet clusters have no pores")
          if self.settings['snap_off']:
              self._apply_snap_off()
docs: r"""
  
          Parameters
          ----------
          pores : array_like
              The list of inlet pores from which the Phase can enter the Network
  
          clusters : list of lists - can be just one list but each list defines
              a cluster of pores that share a common invasion pressure.
  
          Like Basic Invasion Percolation a queue of