<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def valid_host(host):
 """ check valid hostname """

    for part in host.split("."):
        if not _valid_host_part.match(part):
            return False

    return True