# Path: opt_einsum/parser.py
# def get_symbol(i: int) -> str:
#     """Get the symbol corresponding to int ``i`` - runs through the usual 52
#     letters before resorting to unicode characters, starting at ``chr(192)``.
# 
#     **Examples:**
# 
#     ```python
#     get_symbol(2)
#     #> 'c'
# 
#     get_symbol(200)
#     #> 'Ŕ'
# 
#     get_symbol(20000)
#     #> '京'
#     ```
#     """
#     if i < 52:
#         return _einsum_symbols_base[i]
#     return chr(i + 140)
# 
# Path: opt_einsum/typing.py



from typing import Any, Collection, Dict, FrozenSet, Iterable, List, Optional, Tuple, Union, overload
from .parser import get_symbol
from .typing import ArrayIndexType, PathType
import numpy as np
    idx_dict.

    Parameters
    ----------
    indices : iterable
        Indices to base the product on.
    idx_dict : dictionary
        Dictionary of index _sizes

    Returns
    -------
    ret : int
        The resulting product.

    Examples
    --------
    >>> compute_size_by_dict('abbc', {'a': 2, 'b':3, 'c':5})
    90

    """
    ret = 1
    for i in indices:  # lgtm [py/iteration-string-and-sequence]
        ret *= idx_dict[i]
    return ret


def find_contraction(
    positions: Collection[int],
    input_sets: List[ArrayIndexType],
    output_set: ArrayIndexType,

# Path: opt_einsum/parser.py
# def get_symbol(i: int) -> str:
#     """Get the symbol corresponding to int ``i`` - runs through the usual 52
#     letters before resorting to unicode characters, starting at ``chr(192)``.
# 
#     **Examples:**
# 
#     ```python
#     get_symbol(2)
#     #> 'c'
# 
#     get_symbol(200)
#     #> 'Ŕ'
# 
#     get_symbol(20000)
#     #> '京'
#     ```
#     """
#     if i < 52:
#         return _einsum_symbols_base[i]
#     return chr(i + 140)
# 
# Path: opt_einsum/typing.py



# Path: opt_einsum/helpers.py
from typing import Any, Collection, Dict, FrozenSet, Iterable, List, Optional, Tuple, Union, overload
from .parser import get_symbol
from .typing import ArrayIndexType, PathType
import numpy as np

    idx_dict.

    Parameters
    ----------
    indices : iterable
        Indices to base the product on.
    idx_dict : dictionary
        Dictionary of index _sizes

    Returns
    -------
    ret : int
        The resulting product.

    Examples
    --------
    >>> compute_size_by_dict('abbc', {'a': 2, 'b':3, 'c':5})
    90

    """
    ret = 1
    for i in indices:  # lgtm [py/iteration-string-and-sequence]
        ret *= idx_dict[i]
    return ret


def find_contraction(
    positions: Collection[int],
    input_sets: List[ArrayIndexType],
    output_set: ArrayIndexType,

) -> Tuple[FrozenSet[str], List[ArrayIndexType], ArrayIndexType, ArrayIndexType]: