code: def send_command(self, command, arg=None):
      
      if arg is not None:
        command = '%s:%s' % (command, arg)
      self._write(six.StringIO(command), len(command))
docs: Sends a command to the device.
  
      Args:
        command: The command to send.
        arg: Optional argument to the command.