code: def get_dataset_by_name_and_workspace(
      name: Optional[str] = None,
      *,
      workspace: Optional[Union[str, Workspace]] = None,
      id: Optional[str] = None,
  ) -> Optional["FeedbackDatasetModel"]:
      """Checks whether a `FeedbackDataset` exists in Argilla or not, based on the `name`, `id`, or the combination of
      `name` and `workspace`.
  
      Args:
          name: the name of the `FeedbackDataset` in Argilla.
          workspace: the name of the workspace in Argilla where the `FeedbackDataset` is located.
          id: the Argilla ID of the `FeedbackDataset`.
  
      Returns:
          The `FeedbackDataset` if it exists in Argilla, `None` otherwise.
  
      Raises:
          ValueError: if the `workspace` is not a `Workspace` instance or a string.
          Exception: if the `FeedbackDataset` could not be listed from Argilla.
  
      Examples:
          >>> import argilla as rg
          >>> rg.init(api_url="...", api_key="...")
          >>> from argilla.client.feedback.dataset.helpers import get_dataset_by_name_and_workspace
          >>> dataset = get_dataset_by_name_and_workspace(name="my-dataset")
      """
      assert (name and workspace) or name or id, (
          "You must provide either the `name` and `workspace` (the latter just if"
          " applicable, if not the default `workspace` will be used) or the `id`, which"
          " is the Argilla ID of the `rg.FeedbackDataset`."
      )
  
      client = active_client()
      httpx_client: "httpx.Client" = client.http_client.httpx
  
      if name:
          if workspace is None:
              workspace = Workspace.from_name(client.get_workspace())
          elif isinstance(workspace, str):
              workspace = Workspace.from_name(workspace)
          elif not isinstance(workspace, Workspace):
              raise ValueError(
                  f"Workspace must be a `rg.Workspace` instance or a string, got {type(workspace)}"
              )
  
          try:
              datasets = datasets_api_v1.list_datasets(
                  client=httpx_client
              ).parsed
          except Exception as e:
              raise Exception(
                  f"Failed while listing the `FeedbackTask` datasets from Argilla with exception: {e}"
              )
  
          for dataset in datasets:
              if (
                  dataset.name == name
                  and dataset.workspace_id == workspace.id
              ):
                  return dataset
          return None
      elif id:
          try:
              return datasets_api_v1.get_dataset(
                  client=httpx_client, id=id
              ).parsed
          except Exception:
              return None
      else:
          raise ValueError(
              "You must provide either the `name` and `workspace` or the `id` of the `FeedbackDataset`."
          )
  
imports: import typing
  from typing import Any, Dict, List, Optional, Type, Union
  import httpx
  from argilla.client.feedback.constants import FIELD_TYPE_TO_PYTHON_TYPE
  from argilla.client.feedback.dataset.base import FeedbackDatasetBase
  from argilla.client.feedback.schemas import FeedbackRecord
  from argilla.client.feedback.schemas.enums import MetadataPropertyTypes
  from argilla.client.feedback.schemas.types import AllowedFieldTypes, AllowedMetadataPropertyTypes, AllowedQuestionTypes
  from argilla.client.sdk.v1.datasets import api
  from argilla.client.sdk.v1.datasets.models import FeedbackDatasetModel
  from argilla.client.singleton import active_client
  from argilla.client.workspaces import Workspace
  from argilla.pydantic_v1 import BaseModel, Extra, ValidationError, create_model
label_desc: Use image node_id 8 for calling a global function with example usage: get_dataset_by_name_and_workspace(name) and returns: None, dataset, datasets_api_v1, None