async def METHOD_NAME(self, device, args, iface):
    if args.operation == "read":
        success = await iface.enable()
        if not success:
            raise GlasgowAppletError("Could not enable NVM access")
        data = {}
        for sector in range(5):
            d = await iface.read_sector(sector)
            if d is None:
                raise GlasgowAppletError(f"Could not read NVM sector {sector:d}")
            data[0xC0 + 8 * sector] = d
        success = await iface.disable()
        if not success:
            raise GlasgowAppletError("Could not disable NVM access")
        self._write_data_file(args.file, data)
    if args.operation == "write":
        data = self._read_data_file(args.file)
        success = await iface.enable()
        if not success:
            raise GlasgowAppletError("Could not enable NVM access")
        success = await iface.erase()
        if not success:
            raise GlasgowAppletError("Could not erase NVM")
        for sector in range(5):
            k = 0xC0 + 8 * sector
            if k not in data:
                continue
            success = await iface.write_sector(sector, data[k])
            if not success:
                raise GlasgowAppletError(f"Could not write NVM sector {sector:d}")
        success = await iface.disable()
        if not success:
            raise GlasgowAppletError("Could not disable NVM access")