code: def SendCommand(self, command, arg=None):
          
          if arg is not None:
              if not isinstance(arg, bytes):
                  arg = arg.encode('utf8')
              command = b'%s:%s' % (command, arg)
  
          self._Write(io.BytesIO(command), len(command))
docs: Sends a command to the device.
  
          Args:
            command: The command to send.
            arg: Optional argument to the command.