code: def __init__(self, corpus, tokenizer=None):
      self.corpus_size = len(corpus)
      self.avgdl = 0
      self.doc_freqs = []
      self.idf = {}
      self.doc_len = []
      self.tokenizer = tokenizer
  
      if tokenizer:
          corpus = self._tokenize_corpus(corpus)
  
      nd = self._initialize(corpus)
      self._calc_idf(nd)
  
imports: from nboost.plugins import Plugin
  from nboost.delegates import ResponseDelegate
  from nboost.database import DatabaseRow
  import numpy
  from multiprocessing import Pool, cpu_count
  import math
  from nltk.stem import PorterStemmer
  from nltk.tokenize import word_tokenize
  from nltk.corpus import stopwords
  import nltk
label_desc: Use image node_id 1 to create a new BM25 object  with example: obj = BM25(corpus, tokenizer)