code: def write(self, file):
          
          # Write environment state data.
          file.write("State\n")
          file.write( ("-" * 5) + "\n")
          self.writeDataTable(file, type="state")
  
          # Write action data.
          file.write("Action\n")
          file.write( ("-" * 6) + "\n")
          self.writeDataTable(file, type="action")
  
          # Write reward data.
          file.write("Reward\n")
          file.write( ("-" * 6) + "\n")
          self.writeDataTable(file, type="reward")
docs: Writes market experiment data to file in ReStructuredText format.