def METHOD_NAME(sequence_batching_str):
    full_path = os.path.join(os.path.dirname(__file__), "config.pbtxt")
    with open(full_path, mode="r+", encoding="utf-8", errors="strict") as f:
        txt = f.read()
        if "sequence_batching {" in txt:
            txt, post_match = txt.split("sequence_batching {")
            if sequence_batching_str != "":
                txt += "sequence_batching {\n"
                txt += sequence_batching_str
                txt += "\n}  # end sequence_batching\n"
            txt += post_match.split("\n}  # end sequence_batching\n")[1]
        elif sequence_batching_str != "":
            txt += "\nsequence_batching {\n"
            txt += sequence_batching_str
            txt += "\n}  # end sequence_batching\n"
        f.truncate(0)
        f.seek(0)
        f.write(txt)
    return txt