<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_brain_requirements(connection, remote_dbs, requirements):
 """ validates the rethinkdb has the 'correct' databases and tables should get remote_dbs from brain.connection.validate_get_dbs :param connection: <rethinkdb.net.DefaultConnection> :param remote_dbs: <set> database names present in remote database :param requirements: <dict> example(brain.connection.SELF_TEST) :return: <bool> True :raises: AssertionError or Reql*Error """

    for database in requirements:
        assert (database in remote_dbs), "database {} must exist".format(database)
        remote_tables = frozenset(rethinkdb.db(database).table_list().run(connection))
        for table in requirements[database]:
            assert (table in remote_tables), "{} must exist in {}".format(table, database)
    return True