def METHOD_NAME(self):
    with tempfile.NamedTemporaryFile() as f:
        f.write(b'data:image/png;base64,0001\n')
        f.write(b'data:image/png;base64,0002\n')
        f.write(b'data:image/png;base64,0003\n')
        f.flush()
        with WPTScreenshot(f.name, api=self.api, processes=2) as s:
            s.MAXIMUM_BATCH_SIZE = 2
            s.process()
    self.server.terminate()
    _, err = self.server.communicate()
    sizes = self._batch_sizes(err)
    self.assertSetEqual(set(sizes), {1, 2})