import re


def remove_block(text, block_tag):
    """Remove the specified block from the template text.
    
    A block is marked by [[block_name]]block contents[[/block_name]].

    Parameters
    ----------
    text : str
        The template text to remove the block from.
    block_tag : str
        The name of the block to remove. We will search for [[block_tag]]contents[[/block_tag]] and remove it.
    """
    return re.sub(f"\\[\\[{block_tag}\\]\\](.|\\r|\\n)*\\[\\[/{block_tag}\\]\\]", "", text, flags=re.MULTILINE)