code: def write_concordance_from_file(filepaths: Union[str, List[str]], name: str) -> None:
      
      assert isinstance(filepaths, (str, list))
      if isinstance(filepaths, str):
          filepath = filepaths  # type: str
          text = read_file(filepath)  # type: str
      elif isinstance(filepaths, list):
          text = ''
          for filepath in filepaths:
              text += read_file(filepath)
      list_of_lists = build_concordance(text)  # type: List[List[str]]
      user_data_rel = '~/cltk_data/user_data'  # type: str
      user_data = os.path.expanduser(user_data_rel)  # type: str
      if not os.path.isdir(user_data):
          os.makedirs(user_data)
      file_path = os.path.join(user_data, 'concordance_' + name + '.txt')
      concordance_output = ''  # type: str
      for word_list in list_of_lists:
          for line in word_list:
              concordance_output += line + '\n'
      try:
          with open(file_path, 'w') as open_file:  # type: IO
              open_file.write(concordance_output)
              logger.info("Wrote concordance to '%s'.", file_path)
      except IOError as io_error:
          logger.error("Failed to write concordance to '%s'. Error: %s", file_path, io_error)
docs: This calls the modified ConcordanceIndex, taken and modified from
      the NLTK, and writes to disk a file named 'concordance_' + name at
      '~/cltk_data/user_data/'.
  
      TODO: Add language (here or in class), lowercase option, stemming/
      lemmatization, else?
  
      :type filepaths: str or list
      :param filepaths: Filepath of text(s) to be used in concordance.
      :rtype : str