def get_filled_buffer_frame_stack(frame_stack=<NUM_LIT:4>, frame_dim=<NUM_LIT:1>):
observation_space = gym.spaces.Box(low=<NUM_LIT:0>, high=<NUM_LIT:255>, shape=(<NUM_LIT:2>, <NUM_LIT:2>, frame_dim * frame_stack), dtype=int)<EOL>action_space = gym.spaces.Discrete(<NUM_LIT:4>)<EOL>buffer = CircularVecEnvBufferBackend(<EOL>buffer_capacity=<NUM_LIT:20>, num_envs=<NUM_LIT:2>, observation_space=observation_space, action_space=action_space,<EOL>frame_stack_compensation=True, frame_history=frame_stack<EOL>)<EOL>v1 = np.ones(<NUM_LIT:8> * frame_dim).reshape((<NUM_LIT:2>, <NUM_LIT:2>, <NUM_LIT:2>, frame_dim))<EOL>done_set = {<NUM_LIT:2>, <NUM_LIT:5>, <NUM_LIT:10>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>}<EOL>item_array = []<EOL>for i in range(<NUM_LIT:30>):<EOL><INDENT>item = v1.copy()<EOL>item[:, <NUM_LIT:0>] *= (i+<NUM_LIT:1>)<EOL>item[:, <NUM_LIT:1>] *= <NUM_LIT:10> * (i+<NUM_LIT:1>)<EOL>done_array = np.array([i in done_set, (i+<NUM_LIT:1>) in done_set], dtype=bool)<EOL>item_array.append(item)<EOL>if len(item_array) < frame_stack:<EOL><INDENT>item_concatenated = np.concatenate([item] * frame_stack, axis=-<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>item_concatenated = np.concatenate(item_array[-frame_stack:], axis=-<NUM_LIT:1>)<EOL><DEDENT>buffer.store_transition(item_concatenated, <NUM_LIT:0>, float(i) / <NUM_LIT:2>, done_array)<EOL><DEDENT>return buffer<EOL>
Return a preinitialized buffer with frame stack implemented