<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_state(self):
 """ Create state from sensors and battery """

        # Include battery level in state
        battery = self.player.stats['battery']/100
        # Create observation from sensor proximities
        # TODO: Have state persist, then update columns by `sensed_type`

        # Multi-channel; detecting `items`
        if len(self.mode['items']) > 0:
            observation = []
            for sensor in self.player.sensors:
                col = []
                # Always include range in channel 0
                col.append(sensor.proximity_norm())
                for item_type in self.mode['items']:
                    if sensor.sensed_type == item_type:
                        col.append(sensor.proximity_norm())
                    else:
                        # Default to 1 (`max_range/max_range`)
                        col.append(1)
                observation.append(col)
            if 'battery' in self.mode:
                observation.append([battery,1,1])

        # Single-channel; walls only
        else:
            observation = [o.proximity_norm() for o in self.player.sensors]
            if 'battery' in self.mode:
                observation.append(battery)

        return observation