code: def read_csv(csv_name):
      """
      Read data from a csv file into a dictionary.
      :param str csv_name: path to a csv file.
      :return dict: a dictionary represents the data in file.
      """
      data = {}
      if int(sys.version[0]) == 2:
          str_types = (str, unicode)
      else:
          str_types = (bytes, str)
      if not isinstance(csv_name, str_types):
          raise exceptions.InvalidDataFormat(
              "luminol.utils: csv_name has to be a string!"
          )
      with open(csv_name, "r") as csv_data:
          reader = csv.reader(csv_data, delimiter=",", quotechar="|")
          for row in reader:
              try:
                  key = to_epoch(row[0])
                  value = float(row[1])
                  data[key] = value
              except ValueError:
                  pass
      return data
  
file_path: luminol/src/luminol/utils.py
imports: import csv
  import datetime
  import time
  from luminol import constants, exceptions
  from scipy.stats import binom
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: read_csv(csv_name) and returns: data