import re


def has_table_of_contents(md_text):
    """
    Return True or False whether or not a Table of Contents header already exists in the given Markdown text.
    """
    return re.search(r'^#+\sTable\sof\sContents', md_text,
                     re.IGNORECASE | re.MULTILINE) is not None