code: def load(
      name: str,
      workspace: Optional[str] = None,
      query: Optional[str] = None,
      vector: Optional[Tuple[str, List[float]]] = None,
      ids: Optional[List[Union[str, int]]] = None,
      limit: Optional[int] = None,
      sort: Optional[List[Tuple[str, str]]] = None,
      id_from: Optional[str] = None,
      batch_size: int = 250,
      include_vectors: bool = True,
      include_metrics: bool = True,
      as_pandas: Optional[bool] = None,
  ) -> Union[Dataset, "RemoteFeedbackDataset"]:
      """Loads a argilla dataset.
  
      Args:
          name: The dataset name.
          workspace: The workspace to which records will be logged/loaded. If `None` (default) and the
              env variable ``ARGILLA_WORKSPACE`` is not set, it will default to the private user workspace.
          query: An ElasticSearch query with the `query string
              syntax <https://docs.argilla.io/en/latest/practical_guides/filter_dataset.html>`_
          vector: Vector configuration for a semantic search
          ids: If provided, load dataset records with given ids.
          limit: The number of records to retrieve.
          sort: The fields on which to sort [(<field_name>, 'asc|decs')].
          id_from: If provided, starts gathering the records starting from that Record.
              As the Records returned with the load method are sorted by ID, `id_from`
              can be used to load using batches.
          batch_size: If provided, load `batch_size` samples per request. A lower batch
              size may help avoid timeouts.
          include_vectors: When set to `False`, indicates that records will be retrieved excluding their vectors,
              if any. By default, this parameter is set to `True`, meaning that vectors will be included.
          include_metrics: When set to `False`, indicates that records will be retrieved excluding their metrics.
              By default, this parameter is set to `True`, meaning that metrics will be included.
          as_pandas: DEPRECATED! To get a pandas DataFrame do
              ``rg.load('my_dataset').to_pandas()``.
  
      Returns:
          A argilla dataset.
  
      Examples:
          **Basic Loading: load the samples sorted by their ID**
  
          >>> import argilla as rg
          >>> dataset = rg.load(name="example-dataset")
  
          **Iterate over a large dataset:**
              When dealing with a large dataset you might want to load it in batches to optimize memory consumption
              and avoid network timeouts. To that end, a simple batch-iteration over the whole database can be done
              employing the `from_id` parameter. This parameter will act as a delimiter, retrieving the N items after
              the given id, where N is determined by the `limit` parameter. **NOTE** If
              no `limit` is given the whole dataset after that ID will be retrieved.
  
          >>> import argilla as rg
          >>> dataset_batch_1 = rg.load(name="example-dataset", limit=1000)
          >>> dataset_batch_2 = rg.load(name="example-dataset", limit=1000, id_from=dataset_batch_1[-1].id)
  
      """
      argilla = ArgillaSingleton.get()
      try:
          return argilla.load(
              name=name,
              workspace=workspace,
              query=query,
              vector=vector,
              ids=ids,
              limit=limit,
              sort=sort,
              id_from=id_from,
              batch_size=batch_size,
              include_metrics=include_metrics,
              include_vectors=include_vectors,
              as_pandas=as_pandas,
          )
      except errors.ArApiResponseError as e:
          workspace = workspace or argilla.get_workspace()
          try:
              dataset = FeedbackDataset.from_argilla(
                  name=name, workspace=workspace
              )
          except ValueError:
              raise e
  
          warnings.warn(
              "Loaded dataset is a `FeedbackDataset`. It's recommended to use "
              f"`rg.FeedbackDataset.from_argilla(name='{name}', workspace='{workspace}')` instead",
              UserWarning,
              stacklevel=2,
          )
  
          return dataset
  
imports: import asyncio
  import warnings
  from asyncio import Future
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union
  from argilla.client.client import Argilla
  from argilla.client.datasets import Dataset
  from argilla.client.enums import DatasetType
  from argilla.client.feedback.dataset.local.dataset import FeedbackDataset
  from argilla.client.models import BulkResponse, Record
  from argilla.client.sdk.commons import errors
  from argilla.client.sdk.datasets.models import Dataset
  from argilla.client.sdk.v1.workspaces.models import WorkspaceModel
  from argilla.client.singleton import ArgillaSingleton
label_desc: Use image node_id 2 for calling a global function with example usage: load(name, workspace, query, vector, ids, limit, sort, id_from, batch_size, include_vectors, include_metrics, as_pandas) and returns: argilla, dataset