def METHOD_NAME(self, subjects):
    indices = dict((k, np.load(os.path.splitext(v)[0]+".npz")) for k, v in subjects.items())
    for brain in self.uniques:
        if isinstance(brain, (dataset.Vertex, dataset.VertexRGB)):
            data = np.array(self.images[brain.name])[0]
            npyform = BytesIO()
            if self.brains[brain.name]['raw']:
                data = data[..., indices[brain.subject]['index'], :]
            else:
                data = data[..., indices[brain.subject]['index']]
            np.save(npyform, np.ascontiguousarray(data))
            npyform.seek(0)
            self.images[brain.name] = [npyform.read()]
    for npz in indices.values():
        npz.close()