def get_occurrences(node):
    """
    Get occurrences data from metadata if it exists
    """

    occurrences = node.entity_tpl.get("metadata", {}).get("occurrences")
    if not isinstance(occurrences, list):
        return {}

    # Let's give MiCADO a default upper bound of 99 for now...
    if occurrences[1] == "UNBOUNDED":
        occurrences[1] = 99

    return {
        "min_instances": occurrences[0],
        "max_instances": occurrences[1]
    }