<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_battery(self):
 """ Get the battery """

        try:
            battery = {
                "charge": self._dev.charge(),
                "isCharging": self._dev.isCharging() == 1,
            }
        except Exception:
            return None

        return battery