docs: def mode(dev, target):
      """ Gets or sets the active mode. """
      click.echo("Current mode: %s" % dev.mode_readable)
      if target:
          click.echo("Setting mode: %s" % target)
          dev.mode = target