code: def test_basic_encode():
      enc = tiktoken.get_encoding("r50k_base")
      assert enc.encode("hello world") == [31373, 995]
  
      enc = tiktoken.get_encoding("p50k_base")
      assert enc.encode("hello world") == [31373, 995]
  
      enc = tiktoken.get_encoding("cl100k_base")
      assert enc.encode("hello world") == [15339, 1917]
      assert enc.encode(" \x850") == [220, 126, 227, 15]
  
file_path: tiktoken/tests/test_encoding.py
imports: from typing import Callable
  import hypothesis
  import hypothesis.strategies
  import pytest
  import tiktoken
  from .test_helpers import ENCODING_FACTORIES, MAX_EXAMPLES
label_desc: Use image node_id 4 for calling a global function with example usage: test_basic_encode() without return types