code: def _compute_size_by_dict(indices, idx_dict):
      """
      Computes the product of the elements in indices based on the dictionary
      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:
          ret *= idx_dict[i]
      return ret
  
file_path: mars/mars/tensor/einsum/einsumfunc.py
imports: import itertools
  from numpy.compat import basestring
  from ..datasource.array import tensor
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_size_by_dict(indices, idx_dict) and returns: ret