<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close_databases(self):
 """ Close all database sessions """

        if self.gc_book:
            self.gc_book.close()
        if self.pricedb_session:
            self.pricedb_session.close()