def screenshot(self, filename, scale=1.0, quality=100):
        result = self.server.screenshot(filename, scale, quality)
        if result:
            return result

        device_file = self.server.jsonrpc.takeScreenshot("screenshot.png",
                                                         scale, quality)
        if not device_file:
            return None
        p = self.server.adb.cmd("pull", device_file, filename)
        p.wait()
        self.server.adb.cmd("shell", "rm", device_file).wait()
        return filename if p.returncode is 0 else None
read/write of 4D NMRPipe frequency domain file (double index).
dataset/ETHPy150Open xiaocong/uiautomator/uiautomator/__init__.py/AutomatorDevice.screenshot--crossover with--dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/tests/test_pipe.py/test_4d_freq_double_index