<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def schedule(events, slots, objective_function=None, solver=None, **kwargs):
 """Compute a schedule in schedule form Parameters events : list or tuple of :py:class:`resources.Event` instances slots : list or tuple of :py:class:`resources.Slot` instances solver : pulp.solver a pulp solver objective_function : callable from lp_problem.objective_functions kwargs : keyword arguments arguments for the objective function Returns ------- list A list of instances of :py:class:`resources.ScheduledItem` """

    return conv.solution_to_schedule(
        solution(events, slots, objective_function, solver=solver, **kwargs),
        events, slots
    )