class_docstr: Dataset client api class
class_docstr_tok: ["Dataset","client","api","class"]
code: def create(
      self, name: str, task: TaskType, workspace: str
  ) -> _DatasetApiModel:
      try:
          with api_compatibility(self, min_version="1.4.0"):
              dataset = self._DatasetApiModel(
                  name=name, task=task, workspace=workspace
              )
              self.http_client.post(
                  f"{self._API_PREFIX}", json=dataset.dict()
              )
      except ApiCompatibilityError:
          dataset = self._DatasetApiModel(name=name, task=task)
          self.http_client.post(
              f"{self._API_PREFIX}?workspace={workspace}",
              json=dataset.dict(),
          )
      return dataset
  
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 2 for calling the Datasets obj's underlying member method code with example usage: obj.create(name, task, workspace) and returns: dataset