return np identity( )[idef print_report(rewardslistepisodeint)following thisyou will need to modify the training logic in the previous script you wrotethe -table was updated every iteration this scripthoweverwill collect samples and labels every time step and train new model every steps additionallyinstead of holding -table or neural networkit will use least squares model to predict -values go to the main function and replace the definition of the -table ( np zeros)with the following/ataribot/bot_ _ls py def main()rewards [n_obsn_actions env observation_space nenv action_space wq initialize((n_obsn_actions)stateslabels [][for episode in range( num_episodes )scroll down before the for loop directly below thisadd the following lines which reset the states and labels lists if there is too much