code: def find_within_text(prompt, parts, tokenizer):
      """
      A function that identifies the indices of tokens of a part of the prompt.
      By default we use the first occurence.
      """
      prompt_tokens = model_wrapped.tokenizer.encode(prompt)
      part_tokens = [
          model_wrapped.tokenizer.encode(p)[2:] for p in parts
      ]
      part_token_indices = [
          find_sub_list(pt, prompt_tokens) for pt in part_tokens
      ]
      return part_token_indices
  
imports: import streamlit
  import numpy
  import os
  import torch
  import pandas
  import json
  from tqdm import tqdm
  import transformers
  from model_lib.hf_tooling import HF_LM
  from easydict import EasyDict
  from scipy.special import softmax
  import seaborn
  import matplotlib.pyplot
  from hooks import *
  from model_lib.misc_utils import *
  from model_lib.streamlit_frontend import css
  from rare_knowledge.collection import *
label_desc: Use image node_id 4 for calling a global function with example usage: find_within_text(prompt, parts, tokenizer) and returns: part_token_indices