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 = tokenizer.encode(prompt)
      part_tokens = [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
  
file_path: interpret-text/python/interpret_text/generative/model_lib/misc_utils.py
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: find_within_text(prompt, parts, tokenizer) and returns: part_token_indices