code: def _is_dns_label(name):
      ''' Check that name is DNS label: An alphanumeric (a-z, and 0-9) string,
      with a maximum length of 63 characters, with the '-' character allowed
      anywhere except the first or last character, suitable for use as a hostname
      or segment in a domain name '''
  
      dns_label = re.compile(r)
      if dns_label.match(name):
          return True
      else:
          return False
docs: Check that name is DNS label: An alphanumeric (a-z, and 0-9) string,
      with a maximum length of 63 characters, with the '-' character allowed
      anywhere except the first or last character, suitable for use as a hostname
      or segment in a domain name