code: def __init__(self, data_dir, lang, split="valid"):
      self.examples = read_cosqa_search_examples(
          f"{data_dir}/{lang}/{split}"
      )
      self.codebase = read_cosqa_search_examples(
          f"{data_dir}/{lang}/code_idx_map.txt"
      )
  
      self.text = []
      self.code = []
  
      text2url = {}
      url2code = {}
  
      for idx, ex in enumerate(self.examples):
          self.text.append(ex.text)
          text2url[idx] = ex.url
  
      for idx, ex in enumerate(self.codebase):
          self.code.append(ex.code)
          url2code[ex.url] = idx
  
      self.text2code = {}
  
      for text_id, text in enumerate(self.text):
          self.text2code[text_id] = url2code[text2url[text_id]]
  
imports: import json
  import torch
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 1 to create a new cosqa_search_eval_text object from inherited base classes: Dataset with example: obj = cosqa_search_eval_text(data_dir, lang, split)