def METHOD_NAME(self, curve):
    """Change the Y axis a curve is attached to.
    :param silx.gui.plot.items.Curve curve:
    """
    yaxis = curve.getYAxis()
    curve.setYAxis('left' if yaxis == 'right' else 'right')