def remove_codeblock_syntax_sentinals(code_text):
    r"""
    Removes template comments and vim sentinals

    Args:
        code_text (str):

    Returns:
        str: code_text_
    """
    flags = re.MULTILINE | re.DOTALL
    code_text_ = code_text
    code_text_ = re.sub(r'^ *# *REM [^\n]*$\n?', '', code_text_, flags=flags)
    code_text_ = re.sub(r'^ *# STARTBLOCK *$\n', '', code_text_, flags=flags)
    code_text_ = re.sub(r'^ *# ENDBLOCK *$\n?', '', code_text_, flags=flags)
    code_text_ = code_text_.rstrip()
    return code_text_
def remove_codeblock_syntax_sentinals ( code_text ) : flags = re . MULTILINE | re . DOTALL code_text_ = code_text code_text_ = re . sub ( r'^ *# *REM [^\n]*$\n?' , '' , code_text_ , flags = flags ) code_text_ = re . sub ( r'^ *# STARTBLOCK *$\n' , '' , code_text_ , flags = flags ) code_text_ = re . sub ( r'^ *# ENDBLOCK *$\n?' , '' , code_text_ , flags = flags ) code_text_ = code_text_ . rstrip ( ) return code_text_
r"""
    Removes template comments and vim sentinals

    Args:
        code_text (str):

    Returns:
        str: code_text_