def METHOD_NAME():
    # type: () -> None
    """
    Configure the test cluster.
    """
    logger.debug('setup_cluster')
    with r.connect(host=HOST, port=SERVER_PORTS['server0']) as conn:
        # A test DB is automatically created, but we don't use it and it would skew our metrics.
        response = r.db_drop('test').run(conn)
        assert response['dbs_dropped'] == 1
        # Cluster content.
        response = r.db_create(DATABASE).run(conn)
        assert response['dbs_created'] == 1
        response = r.db(DATABASE).table_create(HEROES_TABLE, **HEROES_TABLE_CONFIG).run(conn)
        assert response['tables_created'] == 1
        response = r.db(DATABASE).table(HEROES_TABLE).index_create(HEROES_TABLE_INDEX_FIELD).run(conn)
        assert response['created'] == 1
        response = r.db(DATABASE).table(HEROES_TABLE).wait(timeout=1).run(conn)
        assert response['ready'] == 1
        # Users.
        # See: https://rethinkdb.com/docs/permissions-and-accounts/
        if AGENT_USER != 'admin':
            # Setup a dedicated Agent user.
            response = r.db('rethinkdb').table('users').insert({'id': AGENT_USER, 'password': AGENT_PASSWORD}).run(conn)
            assert response['inserted'] == 1
            response = r.db('rethinkdb').grant(AGENT_USER, {'read': True}).run(conn)
            assert response['granted'] == 1
        response = r.db('rethinkdb').table('users').insert({'id': CLIENT_USER, 'password': False}).run(conn)
        assert response['inserted'] == 1
        response = r.db(DATABASE).grant(CLIENT_USER, {'read': True, 'write': True}).run(conn)
        assert response['granted'] == 1
    # Simulate client activity.
    # NOTE: ensures that 'written_docs_*' and 'read_docs_*' metrics have non-zero values.
    with r.connect(host=HOST, port=SERVER_PORTS['server0'], user=CLIENT_USER) as conn:
        response = r.db(DATABASE).table(HEROES_TABLE).insert(HEROES_TABLE_DOCUMENTS).run(conn)
        assert response['inserted'] == len(HEROES_TABLE_DOCUMENTS)
        documents = list(r.db(DATABASE).table(HEROES_TABLE).run(conn))
        assert len(documents) == len(HEROES_TABLE_DOCUMENTS)