@staticmethod
def wait(workers: List['RayEnvWorker'], wait_num: int, timeout: Optional[float]=None) -> List['RayEnvWorker']:
    results = [x.result for x in workers]
    (ready_results, _) = ray.wait(results, num_returns=wait_num, timeout=timeout)
    return [workers[results.index(result)] for result in ready_results]
@staticmethod
def wait(workers: List['RayEnvWorker'], wait_num: int, timeout: Optional[float]=None) -> List['RayEnvWorker']:
    results = [x.result for x in workers]
    (ready_results, _) = ray.wait(results, num_returns=wait_num, timeout=timeout)
    return [workers[results.index(result)] for result in ready_results]