class_docstr: Function and Docstring similarity Problem.
  
  This problem contains the data consisting of function
  and docstring pairs as CSV files. The files are structured
  such that they contain two columns without headers containing
  the docstring tokens and function tokens. The delimiter is
  ",".
class_docstr_tok: ["Function","and","Docstring","similarity","Problem",".","This","problem","contains","the","data","consisting","of","function","and","docstring","pairs","as","CSV","files",".","The","files","are","structured","such","that","they","contain","two","columns","without","headers","containing","the","docstring","tokens","and","function","tokens",".","The","delimiter","is","''",",","''","."]
docstr: A generator to return data samples.Returns the data generator to return.
  
  
  Args:
    data_dir: A string representing the data directory.
    tmp_dir: A string representing the temporary directory and is
            used to download files if not already available.
    dataset_split: Train, Test or Eval.
  
  Yields:
    Each element yielded is of a Python dict of the form
      {"inputs": "STRING", "targets": "STRING"}
docstr_tok: ["A","generator","to","return","data","samples.Returns","the","data","generator","to","return",".","Args",":","data_dir",":","A","string","representing","the","data","directory",".","tmp_dir",":","A","string","representing","the","temporary","directory","and","is","used","to","download","files","if","not","already","available",".","dataset_split",":","Train",",","Test","or","Eval",".","Yields",":","Each","element","yielded","is","of","a","Python","dict","of","the","form","{","``","inputs","''",":","``","STRING","''",",","``","targets","''",":","``","STRING","''","}"]
code: def generate_samples(self, data_dir, tmp_dir, dataset_split):
      """A generator to return data samples.Returns the data generator to return.
  
  
      Args:
        data_dir: A string representing the data directory.
        tmp_dir: A string representing the temporary directory and is
                used to download files if not already available.
        dataset_split: Train, Test or Eval.
  
      Yields:
        Each element yielded is of a Python dict of the form
          {"inputs": "STRING", "targets": "STRING"}
      """
  
      # TODO(sanyamkapoor): Manually separate train/eval data set.
      csv_file_names = self.pair_files_list
      csv_files = [
          generator_utils.maybe_download(tmp_dir, file_list[0], uri)
          for uri, file_list in csv_file_names
      ]
  
      for pairs_file in csv_files:
          tf.logging.debug("Reading {}".format(pairs_file))
          with open(pairs_file, "r") as csv_file:
              for line in csv_file:
                  reader = csv.reader(StringIO(line))
                  for docstring_tokens, function_tokens in reader:
                      yield {
                          "inputs": docstring_tokens,
                          "targets": function_tokens,
                          "embed_code": [0],
                      }
  
file_path: tensor2tensor/tensor2tensor/data_generators/function_docstring.py
imports: import csv
  from six import StringIO
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import metrics
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 6 for calling the GithubFunctionDocstring obj's underlying member method code with example usage: obj.generate_samples(data_dir, tmp_dir, dataset_split) without return types