<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_xlim(self, xlim):
 """ Set x-axis limits. Accepts a two-element list to set the x-axis limits. Args: xlim (list):
 lower and upper bounds Raises: ValueError: xlim must contain two elements ValueError: Min must be less than max """

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

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

        self.options["min_x"] = xlim[0]
        self.options["max_x"] = xlim[1]