def swap(self, left, right):
if type(left) is not type(right):<EOL><INDENT>raise LayoutError('<STR_LIT>')<EOL><DEDENT>temp = self[left]<EOL>self[left] = self[right]<EOL>self[right] = temp<EOL>
Swaps the map between left and right.
        Args:
            left (tuple or int): Item to swap with right.
            right (tuple or int): Item to swap with left.
        Raises:
            LayoutError: If left and right have not the same type.