class_docstr: A printer to convert SymPy expressions to strings of Rust code
class_docstr_tok: ["A","printer","to","convert","SymPy","expressions","to","strings","of","Rust","code"]
docstr: basic function for printing `Function`
  
  Function Style :
  
  1. args[0].func(args[1:]), method with arguments
  2. args[0].func(), method without arguments
  3. args[1].func(), method without arguments (e.g. (e, x) => x.exp())
  4. func(args), function with arguments
code: def _print_Function(self, expr):
      """
      basic function for printing `Function`
  
      Function Style :
  
      1. args[0].func(args[1:]), method with arguments
      2. args[0].func(), method without arguments
      3. args[1].func(), method without arguments (e.g. (e, x) => x.exp())
      4. func(args), function with arguments
      """
  
      if expr.func.__name__ in self.known_functions:
          cond_func = self.known_functions[expr.func.__name__]
          func = None
          style = 1
          if isinstance(cond_func, str):
              func = cond_func
          else:
              for cond, func, style in cond_func:
                  if cond(*expr.args):
                      break
          if func is not None:
              if style == 1:
                  ret = "%(var)s.%(method)s(%(args)s)" % {
                      "var": self._print_caller_var(expr.args[0]),
                      "method": func,
                      "args": self.stringify(expr.args[1:], ", ")
                      if len(expr.args) > 1
                      else "",
                  }
              elif style == 2:
                  ret = "%(var)s.%(method)s()" % {
                      "var": self._print_caller_var(expr.args[0]),
                      "method": func,
                  }
              elif style == 3:
                  ret = "%(var)s.%(method)s()" % {
                      "var": self._print_caller_var(expr.args[1]),
                      "method": func,
                  }
              else:
                  ret = "%(func)s(%(args)s)" % {
                      "func": func,
                      "args": self.stringify(expr.args, ", "),
                  }
              return ret
      elif hasattr(expr, "_imp_") and isinstance(expr._imp_, Lambda):
          # inlined function
          return self._print(expr._imp_(*expr.args))
      elif expr.func.__name__ in self._rewriteable_functions:
          # Simple rewrite to supported function possible
          target_f, required_fs = self._rewriteable_functions[
              expr.func.__name__
          ]
          if self._can_print(target_f) and all(
              self._can_print(f) for f in required_fs
          ):
              return self._print(expr.rewrite(target_f))
      else:
          return self._print_not_supported(expr)
  
imports: from __future__ import annotations
  from typing import Any
  from sympy.core import S, Rational, Float, Lambda
  from sympy.core.numbers import equal_valued
  from sympy.printing.codeprinter import CodePrinter
label_desc: Use image node_id 10 for calling the RustCodePrinter obj's underlying member method code with example usage: obj._print_Function(expr) and returns: ret, self, self, self