def GetInstanceState(instance):
  """Return the default state string unless the instance is stopped."""
  if instance.settings and instance.settings.activationPolicy == 'NEVER':
    return 'STOPPED'
  return instance.state