<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_author_by_name(self, name: str) -> Optional[Author]: """Get an author by name, if it exists in the database."""

        return self.session.query(Author).filter(Author.has_name(name)).one_or_none()