def _gen_stats(self, domain_name, task_name):
    temp_dir = self.create_tempdir()
    env = rwrl.load(domain_name=domain_name, task_name=task_name, safety_spec={'enable': True}, log_output=os.path.join(temp_dir.full_path, 'test.pickle'), environment_kwargs=dict(log_safety_vars=True, flat_observation=True))
    random_policy = RandomAgent(env.action_spec()).action
    for _ in range(3):
        timestep = env.step(random_policy())
        while (not timestep.last()):
            timestep = env.step(random_policy())
    env.write_logs()
    return env.logs_path
def _gen_stats(self, domain_name, task_name):
    temp_dir = self.create_tempdir()
    env = rwrl.load(domain_name=domain_name, task_name=task_name, safety_spec={'enable': True}, log_output=os.path.join(temp_dir.full_path, 'test.pickle'), environment_kwargs=dict(log_safety_vars=True, flat_observation=True))
    random_policy = RandomAgent(env.action_spec()).action
    for _ in range(3):
        timestep = env.step(random_policy())
        while (not timestep.last()):
            timestep = env.step(random_policy())
    env.write_logs()
    return env.logs_path