def _leading_comment_pattern(comment_string: str) -> str:
    """
    Convert the comment string for a language into a (string) regular expression
    pattern that will match the comment at the beginning of a source notebook
    line.

    :param comment_string: the comment string

    :return: the pattern
    """
    return r"^\s*{}".format(comment_string)