docstr: Train a BPE tokeniser on some data!
docstr_tok: ["Train","a","BPE","tokeniser","on","some","data","!"]
code: def train(training_data: str, vocab_size: int, pat_str: str):
      """Train a BPE tokeniser on some data!"""
      mergeable_ranks = bpe_train(
          data=training_data, vocab_size=vocab_size, pat_str=pat_str
      )
      return SimpleBytePairEncoding(
          pat_str=pat_str, mergeable_ranks=mergeable_ranks
      )
  
file_path: tiktoken/tiktoken/_educational.py
imports: import collections
  from typing import Optional
  import regex
  import tiktoken
label_desc: Use image node_id 6 for calling the SimpleBytePairEncoding obj's underlying member method code with example usage: obj.train(training_data, vocab_size, pat_str) and returns: SimpleBytePairEncoding