class_docstr: Abstract class for all datasets
code: def _read_sample(self, index: int) -> Tuple[tf.Tensor, Any]:
      img_name, target = self.data[index]
  
      # Check target
      if isinstance(target, dict):
          assert "boxes" in target, "Target should contain 'boxes' key"
          assert (
              "labels" in target
          ), "Target should contain 'labels' key"
      elif isinstance(target, tuple):
          assert len(target) == 2
          assert isinstance(target[0], str) or isinstance(
              target[0], np.ndarray
          ), "first element of the tuple should be a string or a numpy array"
          assert isinstance(
              target[1], list
          ), "second element of the tuple should be a list"
      else:
          assert isinstance(target, str) or isinstance(
              target, np.ndarray
          ), "Target should be a string or a numpy array"
  
      # Read image
      img = (
          tensor_from_numpy(img_name, dtype=tf.float32)
          if isinstance(img_name, np.ndarray)
          else read_img_as_tensor(
              os.path.join(self.root, img_name), dtype=tf.float32
          )
      )
  
      return img, deepcopy(target)
  
file_path: doctr/doctr/datasets/datasets/tensorflow.py
imports: import os
  from copy import deepcopy
  from typing import Any, List, Tuple
  import numpy
  import tensorflow
  from doctr.io import read_img_as_tensor, tensor_from_numpy
  from .base import _AbstractDataset, _VisionDataset
label_desc: Use image node_id 1 for calling the AbstractDataset obj's underlying member method code with example usage: obj._read_sample(index) and returns: img,  deepcopy