def get_control_mode(self):
        """Get the name of the current operation mode.
        
        Returns:
            A string decribing the controlmode.
            
        The returned string is one of the items in :data:`CONTROL_MODES`.
        """
        mode_value = self.read_register(4101)
        
        try:
            return CONTROL_MODES[mode_value]
        except __HOLE__:
            raise ValueError( 'Could not parse the control mode value: {0}. Allowed values are: {1}'.format(
                repr(mode_value), repr(list(CONTROL_MODES.keys()) ) )) # To comply with both Python2 and Python3
dataset/ETHPy150Open pyhys/minimalmodbus/omegacn7500.py/OmegaCN7500.get_control_mode