def METHOD_NAME(self, outfile='/tmp/still.jpg',
                        res=[640, 480], format=None):
    '''Take a still photo using the Raspberry Pi camera module
       and the picamera Python module.
       Does not support outfile = '-'.
    '''
    if self.verbose:
        print("Res:", res)
        if res:
            res_str = "%dx%d" % tuple(res)
        else:
            res_str = "(unknown res)"
        print("Taking %s photo with picamera module" % res_str)
    with picamera.PiCamera(resolution=res) as camera:
        # camera.resolution = res
        camera.start_preview()
        # Camera warm-up time
        time.sleep(2)
        if outfile == '-':
            stream = io.BytesIO()
            camera.capture(stream, format='jpeg')
            # "Rewind" the stream to the beginning to read its contents
            stream.seek(0)
            return stream
        else:
            camera.capture(outfile)
        # Is this needed? What does previewing mean?
        camera.stop_preview()