code: def solution_to_schedule(solution, events, slots):
      
      return [
          ScheduledItem(
              event=events[item[0]],
              slot=slots[item[1]]
          )
          for item in solution
      ]
docs: Convert a schedule from solution to schedule form
  
      Parameters
      ----------
      solution : list or tuple
          of tuples of event index and slot index for each scheduled item
      events : list or tuple
          of :py:class:`resources.Event` instances
      slots : list or tuple
          of :py:class:`resources.Slot` instances
  
      Returns
      -------
      list
          A list of instances of :py:class:`resources.ScheduledItem`