<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_devices(device_type: DeviceType) -> Iterator[str]: """Gets names of power devices of the specified type. :param str device_type: the type of the devices to retrieve :return: the device names :rtype: Iterator[str] """

    for device in BASE_PATH.iterdir():
        with open(str(Path(device, 'type'))) as type_file:
            if type_file.readline().strip() == device_type.value:
                yield device.name