docstr: The getter yields a tuple (X, y), where:
    - `X `is a concatenation of all encoded representations of the row. Size: (B, n_features)
    - `y` is the encoded target. Size: (B, n_features)
    
  :param idx: index of the row to access.
  
  :return: tuple (X, y) with encoded data.
docstr_tok: ["The","getter","yields","a","tuple","(","X",",","y",")",",","where",":","-","`","X","`","is","a","concatenation","of","all","encoded","representations","of","the","row",".","Size",":","(","B",",","n_features",")","-","`","y","`","is","the","encoded","target",".","Size",":","(","B",",","n_features",")",":","param","idx",":","index","of","the","row","to","access",".",":","return",":","tuple","(","X",",","y",")","with","encoded","data","."]
code: def __getitem__(self, idx: int) -> Tuple[torch.Tensor, torch.Tensor]:
      """
      The getter yields a tuple (X, y), where:
        - `X `is a concatenation of all encoded representations of the row. Size: (B, n_features)
        - `y` is the encoded target. Size: (B, n_features)
  
      :param idx: index of the row to access.
  
      :return: tuple (X, y) with encoded data.
  
      """  # noqa
      if self.use_cache and self.X_cache[idx] is not torch.nan:
          X = self.X_cache[idx, :]
          Y = self.Y_cache[idx]
      else:
          X, Y = self._encode_idxs(
              [
                  idx,
              ]
          )
          if self.use_cache:
              self.X_cache[idx, :] = X
              self.Y_cache[idx, :] = Y
  
      return X, Y
  
imports: import inspect
  from typing import List, Tuple, Dict
  import torch
  import numpy
  import pandas
  from torch.utils.data import Dataset
  from lightwood.encoder.base import BaseEncoder
label_desc: Use image node_id 3 for calling the EncodedDs obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: X,  Y