def matchAllowedVOs(vo, resource_ad):
    """True if `vo` is in the AllowedVOs list in `resource_ad`, or
    if AllowedVOs is undefined or empty

    """
    allowed_vos = resource_ad.get('AllowedVOs', None)
    if not allowed_vos:
        return True
    else:
        return vo in list(allowed_vos)