def _get_hostname(server):
  """Get server hostname from an atest dict.

  >>> server = {'hostname': 'foo.example.com'}  # from atest
  >>> _get_hostname(server)
  'foo'
  """
  return server['hostname'].partition('.')[0]