code: def createCsvData(self, csvfilename):
      data_files = {}
      csv_data = []
      num_of_data_files = 0
  
      if os.path.exists(csvfilename):
          with open(csvfilename, "r") as f:
              csv_lines = f.readlines()
  
              linecount = 0
  
              num_of_items = -1
              csvreader = csv.reader(csv_lines)
  
              self._progress.init(len(csv_lines), "Create CSV")
  
              for row in csvreader:
                  self._progress(1.0)
  
                  # Validate
                  if linecount == 0:  # Header
                      num_of_items = len(row)
                  else:  # Data
                      if num_of_items != len(row):
                          self._log(
                              "invalid line {} in csv file.".format(
                                  linecount
                              )
                          )
                          return None, None
  
                  new_row = []
                  for item in row:
                      data_file = None
                      if os.path.isfile(item):
                          data_file = item
                      else:
                          fn = "/".join(
                              [
                                  os.path.dirname(csvfilename),
                                  "/".join(item.split("\\")),
                              ]
                          )
                          if os.path.isfile(fn):
                              data_file = fn
  
                      if data_file is not None:
                          name = "/".join(
                              [
                                  "data",
                                  "{:012d}_{}".format(
                                      num_of_data_files,
                                      os.path.basename(data_file),
                                  ),
                              ]
                          )
                          data_files[name] = os.path.abspath(data_file)
                          new_row.append(name)
                          num_of_data_files += 1
                      else:
                          new_row.append(item)
                  csv_data.append(new_row)
                  linecount += 1
              self._progress.finish()
      return csv_data, data_files
  
imports: import boto3
  import csv
  import json
  import os
  import urllib.parse
  import urllib.request
  import shutil
  import tarfile
  import tempfile
  import threading
  import tqdm
label_desc: Use image node_id 1 for calling the Uploader obj's underlying member method code with example usage: obj.createCsvData(csvfilename) and returns: csv_data,  data_files, None,  None