class_docstr: An instance of this class converts a string of a Wolfram Mathematica
  expression to a SymPy expression.
  
  The main parser acts internally in three stages:
  
  1. tokenizer: tokenizes the Mathematica expression and adds the missing *
      operators. Handled by ``_from_mathematica_to_tokens(...)``
  2. full form list: sort the list of strings output by the tokenizer into a
      syntax tree of nested lists and strings, equivalent to Mathematica's
      ``FullForm`` expression output. This is handled by the function
      ``_from_tokens_to_fullformlist(...)``.
  3. SymPy expression: the syntax tree expressed as full form list is visited
      and the nodes with equivalent classes in SymPy are replaced. Unknown
      syntax tree nodes are cast to SymPy ``Function`` objects. This is
      handled by ``_from_fullformlist_to_sympy(...)``.
class_docstr_tok: ["An","instance","of","this","class","converts","a","string","of","a","Wolfram","Mathematica","expression","to","a","SymPy","expression",".","The","main","parser","acts","internally","in","three","stages",":","1.","tokenizer",":","tokenizes","the","Mathematica","expression","and","adds","the","missing","*","operators",".","Handled","by","``","_from_mathematica_to_tokens","(","...",")","``","2.","full","form","list",":","sort","the","list","of","strings","output","by","the","tokenizer","into","a","syntax","tree","of","nested","lists","and","strings",",","equivalent","to","Mathematica's","``","FullForm","``","expression","output",".","This","is","handled","by","the","function","``","_from_tokens_to_fullformlist","(","...",")","``",".","3",".","SymPy","expression",":","the","syntax","tree","expressed","as","full","form","list","is","visited","and","the","nodes","with","equivalent","classes","in","SymPy","are","replaced",".","Unknown","syntax","tree","nodes","are","cast","to","SymPy","``","Function","``","objects",".","This","is","handled","by","``","_from_fullformlist_to_sympy","(","...",")","``","."]
code: def _compile_dictionary(cls, dic):
      # for return
      d = {}
  
      for fm, fs in dic.items():
          # check function form
          cls._check_input(fm)
          cls._check_input(fs)
  
          # uncover '*' hiding behind a whitespace
          fm = cls._apply_rules(fm, "whitespace")
          fs = cls._apply_rules(fs, "whitespace")
  
          # remove whitespace(s)
          fm = cls._replace(fm, " ")
          fs = cls._replace(fs, " ")
  
          # search Mathematica function name
          m = cls.FM_PATTERN.search(fm)
  
          # if no-hit
          if m is None:
              err = "'{f}' function form is invalid.".format(f=fm)
              raise ValueError(err)
  
          # get Mathematica function name like 'Log'
          fm_name = m.group()
  
          # get arguments of Mathematica function
          args, end = cls._get_args(m)
  
          # function side check. (e.g.) '2*Func[x]' is invalid.
          if m.start() != 0 or end != len(fm):
              err = "'{f}' function form is invalid.".format(f=fm)
              raise ValueError(err)
  
          # check the last argument's 1st character
          if args[-1][0] == "*":
              key_arg = "*"
          else:
              key_arg = len(args)
  
          key = (fm_name, key_arg)
  
          # convert '*x' to '\\*x' for regex
          re_args = [x if x[0] != "*" else "\\" + x for x in args]
  
          # for regex. Example: (?:(x|y|z))
          xyz = "(?:(" + "|".join(re_args) + "))"
  
          # string for regex compile
          patStr = cls.ARGS_PATTERN_TEMPLATE.format(arguments=xyz)
  
          pat = re.compile(patStr, re.VERBOSE)
  
          # update dictionary
          d[key] = {}
          d[key]["fs"] = fs  # SymPy function template
          d[key]["args"] = args  # args are ['x', 'y'] for example
          d[key]["pat"] = pat
  
      return d
  
imports: from __future__ import annotations
  import re
  import typing
  from itertools import product
  from typing import Any, Callable
  import sympy
  from sympy import Mul, Add, Pow, Rational, log, exp, sqrt, cos, sin, tan, asin, acos, acot, asec, acsc, sinh, cosh, tanh, asinh, acosh, atanh, acoth, asech, acsch, expand, im, flatten, polylog, cancel, expand_trig, sign, simplify, UnevaluatedExpr, S, atan, atan2, Mod, Max, Min, rf, Ei, Si, Ci, airyai, airyaiprime, airybi, primepi, prime, isprime, cot, sec, csc, csch, sech, coth, Function, I, pi, Tuple, GreaterThan, StrictGreaterThan, StrictLessThan, LessThan, Equality, Or, And, Lambda, Integer, Dummy, symbols
  from sympy.core.sympify import sympify, _sympify
  from sympy.functions.special.bessel import airybiprime
  from sympy.functions.special.error_functions import li
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 3 for calling the MathematicaParser obj's underlying member method code with example usage: obj._compile_dictionary(cls, dic) and returns: d