'Permute the arguments cyclically.
Parameters
pos : integer, if positive, shift-right, else shift-left
Examples
>>> from sympy.core.trace import Tr
>>> from sympy import symbols
>>> A, B, C, D = symbols(\'A B C D\', commutative=False)
>>> t = Tr(A*B*C*D)
>>> t.permute(2)
Tr(C*D*A*B)
>>> t.permute(-2)
Tr(C*D*A*B)'

def permute(self, pos):

    if (pos > 0):
        pos = (pos % len(self.args[0].args))
    else:
        pos = (- (abs(pos) % len(self.args[0].args)))
    args = list((self.args[0].args[(- pos):] + self.args[0].args[0:(- pos)]))
    return Tr(Mul(*args))
