def METHOD_NAME(self):
    partition = get_recovery_partition()
    if len(sys.argv) == 1:
        # no subcommand == detect test
        if partition is None:
            raise SystemExit("FAIL: Recovery partition not found")
        else:
            print("Found recovery partiion")
            return
    (recovery_type, recovery_partition) = partition
    subcommand = sys.argv[1]
    sub_commands = ('version', 'file', 'checktype')
    if subcommand not in sub_commands:
        raise SystemExit("ERROR: unexpected subcommand")
    if subcommand == "checktype":
        if len(sys.argv) != 3:
            raise SystemExit(
                "ERROR: recovery_info.py checktype EXPECTED_TYPE")
        expected_type = sys.argv[2]
        if recovery_type != expected_type:
            raise SystemExit("FAIL: expected {}, found {}".format(
                expected_type, recovery_type))
    if subcommand == "file":
        if len(sys.argv) != 3:
            raise SystemExit(
                "ERROR: recovery_info.py file FILE")
        file = sys.argv[2]
        with MountedPartition(recovery_partition) as mnt:
            return subprocess.call([
                'cat', '--', os.path.join(mnt, file)])
    if subcommand == "version":
        if os.path.isfile("/etc/buildstamp"):
            with open('/etc/buildstamp', 'rt', encoding='UTF-8') as stream:
                data = stream.readlines()
                print("image_version: {}".format(data[1].strip()))
        with MountedPartition(recovery_partition) as mntdir:
            fname = "{}/bto.xml".format(mntdir)
            if os.path.isfile(fname):
                o = minidom.parse("{}/bto.xml".format(mntdir))
                bto_platform = o.getElementsByTagName("platform")
                bto_revision = o.getElementsByTagName("revision")
                if bto_platform and bto_revision:
                    bto_platform = bto_platform[0].firstChild.data
                    bto_revision = bto_revision[0].firstChild.data
                    bto_version = bto_platform + " " + bto_revision
                else:
                    bto_iso = o.getElementsByTagName("iso")
                    bto_version = bto_iso[0].firstChild.data
                print("bto_version: {}".format(bto_version))