<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def cmd_serial(self, args):
        '''serial control commands'''
        usage = "Usage: serial <lock|unlock|set|send>"
        if len(args) < 1:
            print(usage)
            return
        if args[0] == "lock":
            self.serial_lock(True)
        elif args[0] == "unlock":
            self.serial_lock(False)
        elif args[0] == "set":
            self.serial_settings.command(args[1:])
        elif args[0] == "send":
            self.serial_send(args[1:])
        else:
            print(usage)