docs: def open_csv(csv_file, mode='r'):
      """
      Get mode depending on Python version
      Based on: http://stackoverflow.com/questions/29840849/writing-a-csv-file-in-python-that-works-for-both-python-2-7-and-python-3-3-in
      """  # noqa
      if version_info[0] == 2:  # Not named on 2.6
          access = '{0}b'.format(mode)
          kwargs = {}
      else:
          access = '{0}t'.format(mode)
          kwargs = {'newline': ''}
  
      return open(csv_file, access, **kwargs)