def METHOD_NAME(args, config, part):
    # Expect list of chunks, such as "0x100000=/out/Esp8266/debug/firmware/spiff_rom.bin 0x200000=custom.bin"
    list = args.expr.split()
    if len(list) == 0:
        raise InputError("No chunks to flash!")
    for e in list:
        addr, filename = e.split('=')
        addr = int(addr, 0)
        part = config.partitions.find_by_address(config.devices[0], addr)
        if part is None:
            raise InputError("No partition contains address 0x%08x" % addr)
        if part.address != addr:
            raise InputError("Address 0x%08x is within partition '%s', not at start (0x%08x)" % (addr, part.name, part.address))
        filesize = os.path.getsize(fixpath(filename))
        if filesize > part.size:
            raise InputError("File '%s' is 0x%08x bytes, too big for partition '%s' (0x%08x bytes)" % (os.path.basename(filename), filesize, part.name, part.size))