def METHOD_NAME(self, cell: NotebookNode) -> bool:
    """Find a region in the cell that is delimeted by
    `self.begin_mark_scheme_delimeter` and `self.end_mark_scheme_delimeter` (e.g.  ###
    BEGIN MARK SCHEME and ### END MARK SCHEME). Remove that region
    depending the cell type.
    This modifies the cell in place, and then returns True if a
    mark region was removed, and False otherwise.
    """
    # pull out the cell input/source
    lines = cell.source.split("\n")
    new_lines = []
    in_ms = False
    removed_ms = False
    attachment_regex = r"!\[.*\]\(attachment:.+?\)"
    for line in lines:
        # begin the test area
        if self.begin_mark_scheme_delimeter in line:
            # check to make sure this isn't a nested BEGIN HIDDEN TESTS
            # region
            if in_ms:
                raise RuntimeError(
                    "Encountered nested begin mark scheme statements")
            in_ms = True
            removed_ms = True
        # end the solution area
        elif self.end_mark_scheme_delimeter in line:
            in_ms = False
        elif self.check_attachment_leakage and in_ms and re.search(attachment_regex, line):
            raise RuntimeError(
                """
                Encountered an attachment in a marking scheme.
                This can leak to student notebooks. 
                You might want to embed your image instead, like here:
                https://github.com/jupyter/nbgrader/issues/1782#issuecomment-1541493629.
                You can suppress this check with ClearMarkScheme.check_attachment_leakage=False.
                For more info: https://github.com/jupyter/nbgrader/issues/1782
                """
            )
        # add lines as long as it's not in the hidden tests region
        elif not in_ms:
            new_lines.append(line)
    # we finished going through all the lines, but didn't find a
    # matching END HIDDEN TESTS statment
    if in_ms:
        raise RuntimeError("No end mark scheme tests statement found")
    # replace the cell source
    cell.source = "\n".join(new_lines)
    return removed_ms