def check_dns_name(bucket_name):
 if ('.' in bucket_name):
  return False
 n = len(bucket_name)
 if ((n < 3) or (n > 63)):
  return False
 if (n == 1):
  if (not bucket_name.isalnum()):
   return False
 match = LABEL_RE.match(bucket_name)
 if ((match is None) or (match.end() != len(bucket_name))):
  return False
 return True

def check_dns_name ( bucket_name ) : if ( '.' in bucket_name ) : return False n = len ( bucket_name ) if ( ( n < 3 ) or ( n > 63 ) ) : return False if ( n == 1 ) : if ( not bucket_name . isalnum ( ) ) : return False match = LABEL_RE . match ( bucket_name ) if ( ( match is None ) or ( match . end ( ) != len ( bucket_name ) ) ) : return False return True
check to see if the bucket_name complies with the restricted dns naming conventions necessary to allow access via virtual-hosting style .