def _get_dev2_hostname(backend, instance=None):
 try:
  return servers.get_hostname(server=backend, instance=instance)
 except servers.InvalidServerError:
  raise InvalidBackendError()
 except servers.InvalidInstancesError:
  raise InvalidInstanceError()

def _get_dev2_hostname ( backend , instance = None ) : try : return servers . get_hostname ( server = backend , instance = instance ) except servers . InvalidServerError : raise InvalidBackendError ( ) except servers . InvalidInstancesError : raise InvalidInstanceError ( )
returns the hostname of a backend [instance] in devappserver2 .