<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def header(self, axis, x, level=0):

 """
 Return the values of the labels for the header of columns or rows.
 
 The value corresponds to the header of column or row x in the
 given level.
 """

        ax = self._axis(axis)
        return ax.values[x] if not hasattr(ax, 'levels') \
            else ax.values[x][level]