def setup_pins(self, pins, values={}, write=True):
<EOL>for pin, mode in iter(pins.items()):<EOL><INDENT>self._setup_pin(pin, mode)<EOL><DEDENT>for pin, value in iter(values.items()):<EOL><INDENT>self._output_pin(pin, value)<EOL><DEDENT>if write:<EOL><INDENT>self.mpsse_write_gpio()<EOL><DEDENT>
Setup multiple pins as inputs or outputs at once.  Pins should be a
        dict of pin name to pin mode (IN or OUT).  Optional starting values of
        pins can be provided in the values dict (with pin name to pin value).