docs: def sync(self):
          """ Upload the changed registers to the chip
  
          This will check which register have been changed since the last sync and send them to the chip.
          You need to call this method if you modify one of the register attributes (mcp23017.IODIRA for example) or
          if you use one of the helper attributes (mcp23017.direction_A0 for example)
          """
          registers = {
              0x00: 'IODIRA',
              0x01: 'IODIRB',
              0x02: 'IPOLA',
              0x03: 'IPOLB',
              0x04: 'GPINTENA',
              0x05: 'GPINTENB',
              0x0C: 'GPPUA',
              0x0D: 'GPPUB',
              0x12: 'GPIOA',
              0x13: 'GPIOB'
          }
          for reg in registers:
              name = registers[reg]
              if getattr(self, name) != getattr(self, '_' + name):
                  self.i2c_write_register(reg, [getattr(self, name)])
                  setattr(self, '_' + name, getattr(self, name))