code: def einindex(pattern: str, arr: T, /, ind: Union[T, List[T]]):
      """
      Demonstrates how einindex should work.
      Supports data-api compliant arrays.
      """
      formula = IndexingFormula(pattern)
      return formula.apply_to_array_api(arr, ind)
  
file_path: einops/einops/experimental/indexing.py
imports: from typing import List, Union, TypeVar, Tuple
  from einops import EinopsError
label_desc: Use image node_id 2 for calling a global function with example usage: einindex(ind) and returns: formula