code: def test_to_from_datasets(self, text2text_records):
      expected_dataset = DatasetForText2Text(text2text_records)
  
      dataset_ds = expected_dataset.to_datasets()
  
      assert isinstance(dataset_ds, datasets.Dataset)
      assert dataset_ds.column_names == [
          "text",
          "prediction",
          "prediction_agent",
          "annotation",
          "annotation_agent",
          "vectors",
          "id",
          "metadata",
          "status",
          "event_timestamp",
          "metrics",
      ]
      assert dataset_ds.features["prediction"] == [
          {
              "text": datasets.Value("string"),
              "score": datasets.Value("float64"),
          }
      ]
  
      dataset = DatasetForText2Text.from_datasets(dataset_ds)
  
      assert isinstance(dataset, DatasetForText2Text)
      _compare_datasets(dataset, expected_dataset)
  
      missing_optional_cols = datasets.Dataset.from_dict(
          {"text": ["mock"]}
      )
      rec = DatasetForText2Text.from_datasets(missing_optional_cols)[0]
      assert rec.text == "mock"
  
      # alternative format for the predictions
      ds = datasets.Dataset.from_dict(
          {"text": ["example"], "prediction": [["ejemplo"]]}
      )
      rec = DatasetForText2Text.from_datasets(ds)[0]
      assert rec.prediction[0][0] == "ejemplo"
      assert rec.prediction[0][1] == pytest.approx(1.0)
  
imports: import copy
  import os
  import sys
  from time import sleep
  import datasets
  import pandas
  import pytest
  import spacy
  from argilla.client.datasets import DatasetBase, DatasetForText2Text, DatasetForTextClassification, DatasetForTokenClassification, WrongRecordTypeError, read_datasets, read_pandas
  from argilla.client.models import Text2TextRecord, TextClassificationRecord, TokenClassificationRecord
  from argilla.datasets import TextClassificationSettings
label_desc: Use image node_id 2 for calling the TestDatasetForText2Text obj's underlying member method code with example usage: obj.test_to_from_datasets(text2text_records) without return types