def min_npix(npix):
    """
    Minimum npix criteria

    Parameters
    ----------
    npix : int
        The minimum number of pixels in a leaf
    """
    def result(structure, index=None, value=None):
        return len(structure.values()) >= npix
    return result