<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def brightness_to_hex(self, level):
 """Convert numeric brightness percentage into hex for insteon"""

        level_int = int(level)
        new_int = int((level_int * 255)/100)
        new_level = format(new_int, '02X')
        self.logger.debug("brightness_to_hex: %s to %s", level, str(new_level))
        return str(new_level)