from typing import Tuple
from pathlib import Path


def read_lean_template(file_name: str = 'template.lean') -> Tuple[int, str]:
    """Read a template Lean file containing at least one sorry.
    Returns the line number of the first sorry"""
    text = Path(file_name).read_text()
    nb = 0
    for line in text.split('\n'):
        nb += 1
        if 'sorry' in line:
            break
    return nb, text