def METHOD_NAME(
    path,
    speedx,
    speedy,
    speedz,
    offset,
    maxt,
    throttle,
    throttle_lines,
    g90_extruder,
    bedz,
    progress,
    layers,
):
    """Runs a GCODE file analysis."""
    import time
    from octoprint.util.gcodeInterpreter import gcode
    throttle_callback = None
    if throttle:
        def throttle_callback(filePos, readBytes):
            if filePos % throttle_lines == 0:
                # only apply throttle every $throttle_lines lines
                time.sleep(throttle)
    offsets = offset
    if offsets is None:
        offsets = []
    elif isinstance(offset, tuple):
        offsets = list(offsets)
    offsets = [(0, 0)] + offsets
    if len(offsets) < maxt:
        offsets += [(0, 0)] * (maxt - len(offsets))
    start_time = time.monotonic()
    progress_callback = None
    if progress:
        def progress_callback(percentage):
            click.echo(f"PROGRESS:{percentage}")
    interpreter = gcode(progress_callback=progress_callback, incl_layers=layers)
    interpreter.load(
        path,
        speedx=speedx,
        speedy=speedy,
        offsets=offsets,
        throttle=throttle_callback,
        max_extruders=maxt,
        g90_extruder=g90_extruder,
        bed_z=bedz,
    )
    click.echo(f"DONE:{time.monotonic() - start_time}s")
    result = interpreter.get_result()
    if empty_result(result):
        click.echo("EMPTY:There are no extrusions in the file, nothing to analyse")
        sys.exit(0)
    if not validate_result(result):
        click.echo(
            "ERROR:Invalid analysis result, please create a bug report in OctoPrint's "
            "issue tracker and be sure to also include the GCODE file with which this "
            "happened"
        )
        sys.exit(-1)
    click.echo("RESULTS:")
    click.echo(yaml.dump(interpreter.get_result(), pretty=True))