def METHOD_NAME(self, mode):
    """
    Sets the operation mode (local or remote)
    :param mode:
        0 LOCAL & LOCKED (Default State),
        1 REMOTE & LOCKED (Front Panel Disabled),
        2 LOCAL & UNLOCKED,
        3 REMOTE & UNLOCKED (Front Panel Active)
    :return:
    """
    if (mode not in [0, 1, 2, 3]):
        raise Exception('valid modes are 0-3, see documentation')
    self.write('C' + str(mode))