'Validate the arguments for a row/column operation.  `error_str`
can be one of "row" or "col" depending on the arguments being parsed.'

def _normalize_op_args(self, op, col, k, col1, col2, error_str='col'):

    if (op not in ['n->kn', 'n<->m', 'n->n+km']):
        raise ValueError("Unknown    {}    operation    '{}'.    Valid    col    operations    are    'n->kn',    'n<->m',    'n->n+km'".format(error_str, op))
    if (op == 'n->kn'):
        col = (col if (col is not None) else col1)
        if ((col is None) or (k is None)):
            raise ValueError("For    a    {0}    operation    'n->kn'    you    must    provide    the    kwargs    `{0}`    and    `k`".format(error_str))
        if (not (0 <= col <= self.cols)):
            raise ValueError("This    matrix    doesn't    have    a    {}    '{}'".format(error_str, col))
    if (op == 'n<->m'):
        cols = set((col, k, col1, col2)).difference([None])
        if (len(cols) > 2):
            cols = set((col, col1, col2)).difference([None])
        if (len(cols) != 2):
            raise ValueError("For    a    {0}    operation    'n<->m'    you    must    provide    the    kwargs    `{0}1`    and    `{0}2`".format(error_str))
        (col1, col2) = cols
        if (not (0 <= col1 <= self.cols)):
            raise ValueError("This    matrix    doesn't    have    a    {}    '{}'".format(error_str, col1))
        if (not (0 <= col2 <= self.cols)):
            raise ValueError("This    matrix    doesn't    have    a    {}    '{}'".format(error_str, col2))
    if (op == 'n->n+km'):
        col = (col1 if (col is None) else col)
        col2 = (col1 if (col2 is None) else col2)
        if ((col is None) or (col2 is None) or (k is None)):
            raise ValueError("For    a    {0}    operation    'n->n+km'    you    must    provide    the    kwargs    `{0}`,    `k`,    and    `{0}2`".format(error_str))
        if (col == col2):
            raise ValueError("For    a    {0}    operation    'n->n+km'    `{0}`    and    `{0}2`    must    be    different.".format(error_str))
        if (not (0 <= col <= self.cols)):
            raise ValueError("This    matrix    doesn't    have    a    {}    '{}'".format(error_str, col))
        if (not (0 <= col2 <= self.cols)):
            raise ValueError("This    matrix    doesn't    have    a    {}    '{}'".format(error_str, col2))
    return (op, col, k, col1, col2)
