docs: def process_file(source_file):
      """
      Extract text from a file (pdf, txt, eml, csv, json)
      :param source_file path to file to read
      :return text from file
      """
      if source_file.endswith(('.pdf', '.PDF')):
          txt = extract_pdf(source_file)
      elif source_file.endswith(('.txt', '.eml', '.csv', '.json')):
          with open(source_file, 'r') as f:
              txt = f.read()
      else:
          logger.info("Unsupported file extension for file {}".format(source_file))
          return ""
      return txt