def METHOD_NAME(output, md_content):
    new = ""
    look_for = '^Output:$'
    for line in md_content:
        if look_for == '^Output:$':
            new += line
            if re.search(look_for, line):
                look_for = "^```sh$"
                continue
        elif look_for == "^```sh$":
            new += line
            if not re.search(look_for, line):
                raise ValueError("Didn't find output block, ```sh should follow the Output: line")
            new += output
            look_for = '^```$'
            continue
        elif look_for == "^```$":
            if re.search(look_for, line):
                new += line
                look_for = None
                continue
        elif look_for is None:
            new += line
    if look_for == '^Output:$':
        raise ValueError("Didn't find output block, missing 'Output:' line")
    return new