def pores(self, labels='all', mode='or', asmask=False):
        r"""
        Returns pore indicies where given labels exist, according to the logic
        specified by the ``mode`` argument.

        Parameters
        ----------
        labels : string or list of strings
            The label(s) whose pores locations are requested.  This argument
            also accepts '*' for wildcard searches.

        mode : string
            Specifies how the query should be performed.  The options are:

            **'or', 'union', 'any'** : (default) Pores with *one or more* of
            the given labels are returned.

            **'and', 'intersection', 'all'** : Pores with *all* of the given
            labels are returned.

            **'xor', 'exclusive_or'** : Pores with *only one* of the given
            labels are returned.

            **'nor', 'none', 'not'** : Pores with *none* of the given labels
            are returned.

            **'nand'** : Pores with *not all* of the given labels are
            returned.

            **'xnor'** : Pores with *more than one* of the given labels are
            returned.

        asmask : boolean
            If ``True`` then a boolean array of length Np is returned with
            ``True`` values indicating the pores that satisfy the query.

        Returns
        -------
        A Numpy array containing pore indices filtered by the logic specified
        in ``mode``.

        See Also
        --------
        throats

        Notes
        -----
        Technically, *nand* and *xnor* should also return pores with *none* of
        the labels but these are not included.  This makes the returned list
        more useful.

        To perform more complex or compound queries, you can opt to receive
        the result a a boolean mask (``asmask=True``), then manipulate the
        arrays manually.

        Examples
        --------
        >>> import openpnm as op
        >>> pn = op.network.Cubic(shape=[5, 5, 5])
        >>> Ps = pn.pores(labels=['top', 'front'], mode='union')
        >>> Ps[:5]  # Look at first 5 pore indices
        array([0, 1, 2, 3, 4])
        >>> pn.pores(labels=['top', 'front'], mode='xnor')
        array([ 4,  9, 14, 19, 24])
        """
        ind = self._get_indices(element='pore', labels=labels, mode=mode)
        if asmask:
            ind = self.tomask(pores=ind)
        return ind