def encode_labels(label: str, label2id: dict, other_class: int) -> int:
    """ Encodes labels with corresponding labels id. If relation is unknown, returns special id for unknown relations"""
    return label2id.get(label, other_class)