@classmethod
def compile_instance_masks(cls):
    """ Compiles instance masks into a master mask that is usable by
                the IO expander. Also determines whether or not the pump
                should be on. 
            Method is generalized to support multiple IO expanders
                for possible future expansion.
        """
    number_IO_expanders = (len(cls._list) - 1) / 4 + 1
    cls.master_mask = [0, 0] * number_IO_expanders
    for ctrlobj in cls:
        cls.master_mask[ctrlobj.bank] |= ctrlobj.mask
        if ctrlobj.pump_request == 1:
            cls.master_mask[cls.pump_bank] |= 1 << cls.pump_pin
