def _get_label_or_level_values(self, key, axis=<NUM_LIT:0>):
if self.ndim > <NUM_LIT:2>:<EOL><INDENT>raise NotImplementedError(<EOL>"<STR_LIT>"<EOL>.format(type=type(self)))<EOL><DEDENT>axis = self._get_axis_number(axis)<EOL>other_axes = [ax for ax in range(self._AXIS_LEN) if ax != axis]<EOL>if self._is_label_reference(key, axis=axis):<EOL><INDENT>self._check_label_or_level_ambiguity(key, axis=axis)<EOL>values = self.xs(key, axis=other_axes[<NUM_LIT:0>])._values<EOL><DEDENT>elif self._is_level_reference(key, axis=axis):<EOL><INDENT>values = self.axes[axis].get_level_values(key)._values<EOL><DEDENT>else:<EOL><INDENT>raise KeyError(key)<EOL><DEDENT>if values.ndim > <NUM_LIT:1>:<EOL><INDENT>if other_axes and isinstance(<EOL>self._get_axis(other_axes[<NUM_LIT:0>]), MultiIndex):<EOL><INDENT>multi_message = ('<STR_LIT:\n>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>multi_message = '<STR_LIT>'<EOL><DEDENT>label_axis_name = '<STR_LIT>' if axis == <NUM_LIT:0> else '<STR_LIT:index>'<EOL>raise ValueError(("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>.format(key=key,<EOL>label_axis_name=label_axis_name,<EOL>multi_message=multi_message))<EOL><DEDENT>return values<EOL>
Return a 1-D array of values associated with `key`, a label or level
from the given `axis`.

Retrieval logic:
  - (axis=0): Return column values if `key` matches a column label.
    Otherwise return index level values if `key` matches an index
    level.
  - (axis=1): Return row values if `key` matches an index label.
    Otherwise return column level values if 'key' matches a column
    level

Parameters
----------
key: str
    Label or level name.
axis: int, default 0
    Axis that levels are associated with (0 for index, 1 for columns)

Returns
-------
values: np.ndarray

Raises
------
KeyError
    if `key` matches neither a label nor a level
ValueError
    if `key` matches multiple labels
FutureWarning
    if `key` is ambiguous. This will become an ambiguity error in a
    future version