code: def is_valid_solution(solution, events, slots):
      
      if len(solution) == 0:
          return False
      array = converter.solution_to_array(solution, events, slots)
      return is_valid_array(array, events, slots)
docs: Take a solution and return whether it is valid for the
      given constraints
  
      Parameters
      ----------
          solution: list or tuple
              a schedule in solution form
          events : list or tuple
              of resources.Event instances
          slots : list or tuple
              of resources.Slot instances
  
      Returns
      -------
          bool
              True if schedule is a valid solution