def _extract(expt, mask):
    """
    defines pixels within the roi

    Parameters
    ----------
    data: aicsimageio.aics_image.AICSImage
    mask: np.ndarray

    Returns
    -------
    extract: np.ndarray

    """
    data = expt['data']

    images = data.data  # np.ndarray

    extract = images * mask  # np.ndarray; same shape as images

    return extract