from typing import List
from typing import Dict
from typing import Set


def get_by_labels_name(bboxes: List[Dict], label_names: Set[str]):
    """
    Finds all 'bbox' Dicts that have any of the specified object category labels. Each bbox dict in
    the `bboxes` list looks smth like::

        {
            ...
            "original_width": 1280,
            "original_height": 720,
            "value": {
                "x": 42.99737453460697,
                "y": 83.2252102322048,
                "width": 15.921303939819348,
                "height": 4.51104668511282,
                "rotation": 0,
                "rectanglelabels": [
                    "try_another_map"
                ]
            },
            ...
        }
    """
    return [bbox["value"] for bbox in bboxes if bbox["value"]["rectanglelabels"][0] in label_names]