@staticmethod
def _map_by_target_id(device_mapping_table, platform_name, target_ids):
    """
        Map available devices to required devices by target id
        :param device_mapping_table: available devices
        :param platform_name: platform
        :param target_ids: list of target ids
        :return: list of targets which matched the requirements
        """
    aux_device_mapping_table = []
    for tid in target_ids:
        for item in device_mapping_table:
            if platform_name:
                if item['platform_name'] != platform_name:
                    continue
            if item['target_id'] == tid:
                aux_device_mapping_table.append(item)
    return aux_device_mapping_table
