class_docstr: Dataset implementation for text recognition tasks
  
  >>> from doctr.datasets import RecognitionDataset
  >>> train_set = RecognitionDataset(img_folder="/path/to/images",
  >>>                                labels_path="/path/to/labels.json")
  >>> img, target = train_set[0]
  
  Args:
  ----
      img_folder: path to the images folder
      labels_path: pathe to the json file containing all labels (character sequences)
      **kwargs: keyword arguments from `AbstractDataset`.
code: def merge_dataset(self, ds: AbstractDataset) -> None:
      # Update data with new root for self
      self.data = [
          (str(Path(self.root).joinpath(img_path)), label)
          for img_path, label in self.data
      ]
      # Define new root
      self.root = Path("/")
      # Merge with ds data
      for img_path, label in ds.data:
          self.data.append(
              (str(Path(ds.root).joinpath(img_path)), label)
          )
  
file_path: doctr/doctr/datasets/recognition.py
imports: import json
  import os
  from pathlib import Path
  from typing import Any, List, Tuple
  from .datasets import AbstractDataset
label_desc: Use image node_id 2 for calling the RecognitionDataset obj's underlying member method code with example usage: obj.merge_dataset(ds) without return types