'Determines if the labels in a domain are a match for labels from a
wildcard valid domain name
:param domain_labels:
A list of unicode strings, with A-label form for IDNs, of the labels
in the domain name to check
:param valid_domain_labels:
A list of unicode strings, with A-label form for IDNs, of the labels
in a wildcard domain pattern
:return:
A boolean - if the domain matches the valid domain'

def _is_wildcard_match(self, domain_labels, valid_domain_labels):

    first_domain_label = domain_labels[0]
    other_domain_labels = domain_labels[1:]
    wildcard_label = valid_domain_labels[0]
    other_valid_domain_labels = valid_domain_labels[1:]
    if (other_domain_labels != other_valid_domain_labels):
        return False
    if (wildcard_label == u'*'):
        return True
    wildcard_regex = re.compile(((u'^' + wildcard_label.replace(u'*', u'.*')) + u'$'))
    if wildcard_regex.match(first_domain_label):
        return True
    return False
