import io


def get_commit_readme(commit):
    """Return the README.md file contents at the given commit."""
    readme_file_blob = commit.tree / "README.md"
    with io.BytesIO(readme_file_blob.data_stream.read()) as f:
        readme_file = f.read().decode("utf-8")
    return readme_file