code: def get_words_and_entities(train_news, valid_news):
      """Load words and entities
  
      Args:
          train_news (str): News train file.
          valid_news (str): News validation file.
  
      Returns:
          dict, dict: Words and entities dictionaries.
      """
      news_words = {}
      news_entities = {}
      tokenizer = RegexpTokenizer(r"\w+")
      news_words, news_entities = _read_news(
          train_news, news_words, news_entities, tokenizer
      )
      news_words, news_entities = _read_news(
          valid_news, news_words, news_entities, tokenizer
      )
      return news_words, news_entities
  
imports: import os
  import random
  import logging
  import json
  import numpy
  import re
  from tqdm import tqdm
  from nltk.tokenize import RegexpTokenizer
  from recommenders.datasets.download_utils import maybe_download, download_path, unzip_file
label_desc: Use image node_id 9 for calling a global function with example usage: get_words_and_entities(train_news, valid_news) and returns: news_words,  news_entities