<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __set_type(self, stats, sensor_type):
 """Set the plugin type. 4 types of stats is possible in the sensors plugin: - Core temperature: 'temperature_core' - Fan speed: 'fan_speed' - HDD temperature: 'temperature_hdd' - Battery capacity: 'battery' """

        for i in stats:
            # Set the sensors type
            i.update({'type': sensor_type})
            # also add the key name
            i.update({'key': self.get_key()})

        return stats