def _get_battery_status(self, battery):
if battery["<STR_LIT>"] == -<NUM_LIT:1>:<EOL><INDENT>return (UNKNOWN_SYMBOL, UNKNOWN, "<STR_LIT>")<EOL><DEDENT>if battery["<STR_LIT>"]:<EOL><INDENT>status = self.status_chr<EOL>color = self.py3.COLOR_GOOD<EOL><DEDENT>else:<EOL><INDENT>status = self.status_bat<EOL>color = self.py3.COLOR_DEGRADED<EOL><DEDENT>if not battery["<STR_LIT>"] and battery["<STR_LIT>"] <= self.low_threshold:<EOL><INDENT>color = self.py3.COLOR_BAD<EOL><DEDENT>if battery["<STR_LIT>"] > <NUM_LIT>:<EOL><INDENT>status = self.status_full<EOL><DEDENT>return (battery["<STR_LIT>"], status, color)<EOL>
Get the battery status