def is_valid_hidden_service_address(entry):
 try:
  return bool(HS_ADDRESS_PATTERN.match(entry))
 except TypeError:
  return False

def is_valid_hidden_service_address ( entry ) : try : return bool ( HS_ADDRESS_PATTERN . match ( entry ) ) except TypeError : return False
checks if a string is a valid format for being a hidden service address .