code: def _extract_tries(sp_model, biasingwords, blist, droprate, maxsize):
      if len(biasingwords) > 0 and droprate > 0:
          biasingwords = random.sample(
              biasingwords, k=int(len(biasingwords) * (1 - droprate))
          )
      if len(biasingwords) < maxsize:
          distractors = random.sample(
              blist, k=max(0, maxsize - len(biasingwords))
          )
          for word in distractors:
              if word not in biasingwords:
                  biasingwords.append(word)
      biasingwords = [
          sp_model.encode(word.lower()) for word in biasingwords
      ]
      biasingwords = sorted(biasingwords)
      worddict = {
          tuple(word): i + 1 for i, word in enumerate(biasingwords)
      }
      lextree = make_lexical_tree(worddict, -1)
      return lextree, biasingwords
  
imports: import json
  import math
  import random
  from functools import partial
  from typing import List
  import sentencepiece
  import torch
  import torchaudio
  from data_module import LibriSpeechDataModule
  from lightning import Batch
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_tries(sp_model, biasingwords, blist, droprate, maxsize) and returns: lextree,  biasingwords