class_docstr: Dataset client api class
class_docstr_tok: ["Dataset","client","api","class"]
code: def _save_settings(
      self, dataset: _DatasetApiModel, settings: Settings
  ):
      if __TASK_TO_SETTINGS__.get(dataset.task) != type(settings):
          raise ValueError(
              f"The provided settings type {type(settings)} cannot be applied to dataset. Task type mismatch"
          )
  
      settings_ = self._SettingsApiModel.parse_obj(
          {
              "label_schema": {
                  "labels": [label for label in settings.label_schema]
              }
          }
      )
  
      try:
          with api_compatibility(self, min_version="1.4"):
              self.http_client.patch(
                  f"{self._API_PREFIX}/{dataset.name}/{dataset.task.value}/settings?workspace={dataset.workspace}",
                  json=settings_.dict(),
              )
      except ApiCompatibilityError:
          with api_compatibility(self, min_version="0.15"):
              self.http_client.put(
                  f"{self._API_PREFIX}/{dataset.task.value}/{dataset.name}/settings",
                  json=settings_.dict(),
              )
  
imports: import math
  import warnings
  from dataclasses import dataclass
  from datetime import datetime
  from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union
  from argilla.client.apis import AbstractApi, api_compatibility
  from argilla.client.sdk.commons.errors import AlreadyExistsApiError, ApiCompatibilityError, ForbiddenApiError, NotFoundApiError
  from argilla.client.sdk.datasets.api import get_dataset
  from argilla.client.sdk.datasets.models import TaskType
  from argilla.pydantic_v1 import BaseModel, Field
label_desc: Use image node_id 7 for calling the Datasets obj's underlying member method code with example usage: obj._save_settings(dataset, settings) without return types