human
Complete the below
def _normalizeHostname(domain):

    ''''Normalizes the given domain, component by component.  ASCII components are
    lowercased, while non-ASCII components are processed using the ToASCII
    algorithm.'
    '''
assistant
#Here is the Python program you requested.
    def convertLabel(label):
        if _isASCII(label):
            return label.lower()
        return encodings.idna.ToASCII(label)
    return '.'.join(map(convertLabel, domain.split('.')))