def METHOD_NAME(format_type, model, normalization, output, files):
    """
    A script producing overlays of lines and regions from either ALTO or
    PageXML files or run a model to do the same.
    """
    if len(files) == 0:
        ctx = click.get_current_context()
        click.echo(ctx.get_help())
        ctx.exit()
    from PIL import Image, ImageDraw
    from kraken.lib import models, xml
    from kraken import align
    if format_type == 'alto':
        fn = xml.parse_alto
        repl_fn = _repl_alto
    else:
        fn = xml.parse_page
        repl_fn = _repl_page
    click.echo(f'Loading model {model}')
    net = models.load_any(model)
    for doc in files:
        click.echo(f'Processing {doc} ', nl=False)
        data = fn(doc)
        if normalization:
            for line in data["lines"]:
                line["text"] = normalize(normalization, line["text"])
        im = Image.open(data['image']).convert('RGBA')
        records = align.forced_align(data, net)
        if output == 'overlay':
            tmp = Image.new('RGBA', im.size, (0, 0, 0, 0))
            draw = ImageDraw.Draw(tmp)
            for record in records:
                for pol in record.cuts:
                    c = next(cmap)
                    draw.polygon([tuple(x) for x in pol], fill=c, outline=c[:3])
            base_image = Image.alpha_composite(im, tmp)
            base_image.save(f'high_{os.path.basename(doc)}_algn.png')
        else:
            repl_fn(doc, records)
        click.secho('\u2713', fg='green')