code: def set_inlets(self, pores=[], overwrite=False):
          r
          Ps = self._parse_indices(pores)
          if np.sum(self['pore.outlets'][Ps]) > 0:
              raise Exception('Some inlets are already defined as outlets')
          if overwrite:
              self['pore.inlets'] = False
          self['pore.inlets'][Ps] = True
          self['pore.invasion_pressure'][Ps] = 0
          self['pore.invasion_sequence'][Ps] = 0
docs: r"""
          Set the locations from which the invader enters the network
  
          Parameters
          ----------
          pores : array_like
              Locations that are initially filled with invader, from which
              clusters grow and invade into the network
  
          overwrite : boolean
              If ``True`` then all existing inlet locations will be removed and
              then the supplied locations will be added.  If ``False`` (default),
              then supplied locations are added to any already existing inlet
              locations.