<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_axis_labels(self, x_var=None, y_var=None):
 """Set axis labels on the left column and bottom row of the grid."""

        if x_var is not None:
            if x_var in self.data.coords:
                self._x_var = x_var
                self.set_xlabels(label_from_attrs(self.data[x_var]))
            else:
                # x_var is a string
                self.set_xlabels(x_var)

        if y_var is not None:
            if y_var in self.data.coords:
                self._y_var = y_var
                self.set_ylabels(label_from_attrs(self.data[y_var]))
            else:
                self.set_ylabels(y_var)
        return self