def get_pool_master(session):
    """Returns the reference to host which is currently master
    over the pool which can be seen with the given session"""
    pool_ref = session.xenapi.pool.get_all()[0]
    host_ref = session.xenapi.pool.get_master(pool_ref)
    return host_ref