def read_data_file(filepath):
  version = None
  fp = open(filepath, 'r')
  try:
    version_line = fp.readline().rstrip('\n\r')
    if version_line.startswith('#version = '):
      version = int(version_line[11:])
    if version == 1:
      return parse_data_file_v1(fp)
    else:
      raise Exception("Unrecognized data file format for file '%s'."
                      % (filepath))
  except:
    raise
Parse a Recurrence data file, returning
dataset/ETHPy150Open cmpilato/recurrence/recurrence_lib/storage.py/read_data_file