def METHOD_NAME(args):
    sampleutil_output_lines = []
    write_sample_autogen(sampleutil_output_lines, args.max_channels)
    output = (
        open(args.sample_autogen_h, "w")
        if args.sample_autogen_h
        else sys.stdout
    )
    output.write("\n".join(sampleutil_output_lines) + "\n")