import re


def get_headers(s):
    """Returns header tuples with text and indentation level."""
    PATTERN = "###* (?=\w)"
    matches = []
    for line in s.splitlines():
        m = re.match(PATTERN, line)
        if m is None:
            continue
        indent = m.group().count("#") - 2
        text = line[m.end() :]
        matches.append((text, indent))
    return matches