def _create_source_file(source, tmp_path):
    """Create a file with the source code."""
    directory = tmp_path / "models"
    directory.mkdir()
    source_file = directory / "models.py"
    source_file.write_text(source)
    return source_file