def METHOD_NAME(self, row, col):
    variables = self._variables
    samples = self._samples
    if col in variables:
        # single variable
        if isinstance(row, int):
            # return a single value
            return self[row][col]
        # return a vector
        return samples[row, variables.index(col)]
    # multiple variables
    try:
        index = (row, [variables.index(v) for v in col])
    except (TypeError, ValueError):
        raise KeyError(f'{col!r} contains a variable not in samples')
    if isinstance(row, (abc.Sequence, np.ndarray)):
        # we know that column is a sequence (because we just constructed it)
        # so we have triggered advanced indexing which we don't want. Use
        # ix_ to get back to basic indexing
        index = np.ix_(row, [variables.index(v) for v in col])
    return samples[index]