def pinMux(gpio_pin, mode, preserve_mode_on_exit=False):
  """ Uses custom device tree overlays to set pin modes.
      If preserve_mode_on_exit=True the overlay will remain loaded
      when the program exits, otherwise it will be unloaded before
      exiting.
      *This should generally not be called directly from user code. """
  if not gpio_pin:
    print gpio_pin % "*unknown pinmux pin: %s"
    return

  if SLOTS_FILE:
    status = pinMux_dtOverlays(gpio_pin, mode, preserve_mode_on_exit)
  else:
    status = pinMux_universalIO(gpio_pin, mode, preserve_mode_on_exit)
  if not status:
    print "*could not configure pinmux for pin %s" % gpio_pin
dataset/ETHPy150Open graycatlabs/PyBBIO/bbio/platform/beaglebone/pinmux.py/pinMux/swapped operands of `%`