def METHOD_NAME(command,
                               handle,
                               *args,
                               timeout=None,
                               abort_on_error=True):
  """Helper for the subset of undercoat commands that operate on an instance."""
  try:
    return undercoat_api_command(
        command, '-handle', handle, *args, timeout=timeout)
  except UndercoatError:
    if abort_on_error:
      # Try to print extra logs and shut down
      # TODO(eep): Should we be attempting to automatically restart?
      dump_instance_logs(handle)
      stop_instance(handle)
    raise