code: def create_corpus(text_list, target_path, logger=None):
      #     nlp = spacy.load("en_core_web_sm", disable=["tagger", "ner", "textcat"])
  
      with open(target_path, "w") as f:
          #  Split sentences for each document
          logger.info("Formatting corpus for {}".format(target_path))
          for text in progress_bar(text_list):
              text = fix_html(text)
              text = replace_multi_newline(text)
              text = spec_add_spaces(text)
              text = rm_useless_spaces(text)
              text = text.strip()
  
              f.write(text + "\n")
  
imports: import re
  import html
  import logging
  import pandas
  import os
  import random
  import torch
  from pathlib import Path
  import pickle
  import shutil
  import itertools
  import more_itertools
  from sklearn.model_selection import train_test_split
  from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler, Dataset
  from torch.utils.data.distributed import DistributedSampler
  import spacy
  from tqdm import tqdm, trange
  from fastprogress.fastprogress import master_bar, progress_bar
  from transformers import WEIGHTS_NAME, BertConfig, BertForSequenceClassification, BertTokenizer, XLMConfig, XLMForSequenceClassification, XLMTokenizer, XLNetConfig, XLNetForSequenceClassification, XLNetTokenizer, RobertaConfig, RobertaForSequenceClassification, RobertaTokenizer, DistilBertConfig, DistilBertForSequenceClassification, DistilBertTokenizer, CamembertConfig, CamembertForSequenceClassification, CamembertTokenizer, ElectraConfig, ElectraForSequenceClassification, ElectraTokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: create_corpus(text_list, target_path, logger) without return types