from typing import Dict
from typing import Any
from typing import List


def get_label_ids_by_category(crop: Dict[str, Any],
                              category: str) -> List[int]:
    """
    Get all label ids from a crop that belong to a certain category

    Args:
        crop: Instance of an entry in the crop database.
        category: one of "present_annotated", "present_unannotated", "absent_annotated", "present_partial_annotation"

    Returns:
        All label ids that belong to the `category` for that crop.
    """
    return [ll[0] for ll in crop['labels'][category]]