def control_filter(self, control_dicts, cropped_icons_dict, plans, top_k):
"""
Filters control items based on their scores and returns the top-k items.
:param control_dicts: The dictionary of all control items.
:param cropped_icons_dict: The dictionary of the cropped icons.
:param plans: The plans to compare the control icons against.
:param top_k: The number of top items to return.
:return: The list of top-k control items based on their scores.
"""
scores_items = []
filtered_control_dict = {}
for label, cropped_icon in cropped_icons_dict.items():
score = self.control_filter_score(cropped_icon, plans)
scores_items.append((score, label))
topk_scores_items = heapq.nlargest(top_k, scores_items, key=lambda x: x[0])
topk_labels = [scores_items[1] for scores_items in topk_scores_items]
for label, control_item in control_dicts.items():
if label in topk_labels:
filtered_control_dict[label] = control_item
return filtered_control_dict