<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_ylim(self, ylim):
 """ Set y-axis limits. Accepts a two-element list to set the y-axis limits. Args: ylim (list):
 lower and upper bounds Raises: ValueError: ylim must contain two elements ValueError: Min must be less than max """

        if len(ylim) != 2:
            raise ValueError("ylim must contain two elements")

        if ylim[1] < ylim[0]:
            raise ValueError("Min must be less than Max")

        self.options["min_y"] = ylim[0]
        self.options["max_y"] = ylim[1]