<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_cameras_battery_level(self):
 """Return a list of battery levels of all cameras."""

        battery_levels = {}
        if not self.camera_properties:
            return None

        for camera in self.camera_properties:
            serialnum = camera.get('serialNumber')
            cam_battery = camera.get('batteryLevel')
            battery_levels[serialnum] = cam_battery
        return battery_levels