code: def parse_mathematica(s):
      """
      Translate a string containing a Wolfram Mathematica expression to a SymPy
      expression.
  
      If the translator is unable to find a suitable SymPy expression, the
      ``FullForm`` of the Mathematica expression will be output, using SymPy
      ``Function`` objects as nodes of the syntax tree.
  
      Examples
      ========
  
      >>> from sympy.parsing.mathematica import parse_mathematica
      >>> parse_mathematica("Sin[x]^2 Tan[y]")
      sin(x)**2*tan(y)
      >>> e = parse_mathematica("F[7,5,3]")
      >>> e
      F(7, 5, 3)
      >>> from sympy import Function, Max, Min
      >>> e.replace(Function("F"), lambda *x: Max(*x)*Min(*x))
      21
  
      Both standard input form and Mathematica full form are supported:
  
      >>> parse_mathematica("x*(a + b)")
      x*(a + b)
      >>> parse_mathematica("Times[x, Plus[a, b]]")
      x*(a + b)
  
      To get a matrix from Wolfram's code:
  
      >>> m = parse_mathematica("{{a, b}, {c, d}}")
      >>> m
      ((a, b), (c, d))
      >>> from sympy import Matrix
      >>> Matrix(m)
      Matrix([
      [a, b],
      [c, d]])
  
      If the translation into equivalent SymPy expressions fails, an SymPy
      expression equivalent to Wolfram Mathematica's "FullForm" will be created:
  
      >>> parse_mathematica("x_.")
      Optional(Pattern(x, Blank()))
      >>> parse_mathematica("Plus @@ {x, y, z}")
      Apply(Plus, (x, y, z))
      >>> parse_mathematica("f[x_, 3] := x^3 /; x > 0")
      SetDelayed(f(Pattern(x, Blank()), 3), Condition(x**3, x > 0))
      """
      parser = MathematicaParser()
      return parser.parse(s)
  
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 2 for calling a global function with example usage: parse_mathematica(s) and returns: parser