code: def add_banned_words_frontend_conf(task_state, fpath: str = None):
      """
      Adds the list of banned words to the task config to be used later in the frontend.
  
      It reads the text file specified in fpath to populate a list banned words. Then adds
      this list to Mephisto `task_config` to make it accessible for the front-end app. The
      file specified by `fpath` is a plain text file where each line contains a single
      banned word/phrase.
      """
      banned_words = []
      if fpath and os.path.exists(fpath):
          with open(fpath, "r") as fin:
              banned_words.extend(
                  [w.strip().lower() for w in fin if w.strip()]
              )
  
      task_state.task_config["bannedWords"] = banned_words
  
imports: import random
  import os
  from collections import defaultdict
  import hydra
  from omegaconf import DictConfig
  from dataclasses import dataclass, field
  from typing import List, Dict, Any
  from parlai.crowdsourcing.projects.wizard_of_internet import constants
  from parlai.crowdsourcing.projects.wizard_of_internet.wizard_internet_blueprint import WIZARD_INTERNET_PARLAICHAT_BLUEPRINT
  from parlai.crowdsourcing.utils.mturk import MTurkRunScriptConfig
  import parlai.utils.logging
  from mephisto.abstractions.databases.local_database import LocalMephistoDB
  from mephisto.abstractions.blueprints.parlai_chat.parlai_chat_blueprint import SharedParlAITaskState
  from mephisto.operations.operator import Operator
  from mephisto.operations.hydra_config import register_script_config
  from mephisto.tools.scripts import load_db_and_process_config
label_desc: Use image node_id 10 for calling a global function with example usage: add_banned_words_frontend_conf(task_state, fpath) without return types