code: def _str_for_expression(var: Variable, formatting: str) -> str:
      # Avoid circular import
      from pymc.distributions.distribution import SymbolicRandomVariable
  
      # construct a string like f(a1, ..., aN) listing all random variables a as arguments
      def _expand(x):
          if x.owner and (
              not isinstance(
                  x.owner.op, (RandomVariable, SymbolicRandomVariable)
              )
          ):
              return reversed(x.owner.inputs)
  
      parents = [
          x
          for x in walk(nodes=var.owner.inputs, expand=_expand)
          if x.owner
          and isinstance(
              x.owner.op, (RandomVariable, SymbolicRandomVariable)
          )
      ]
      names = [x.name for x in parents]
  
      if "latex" in formatting:
          return (
              r"f("
              + ",~".join(
                  [
                      _latex_text_format(_latex_escape(n.strip("$")))
                      for n in names
                  ]
              )
              + ")"
          )
      else:
          return r"f(" + ", ".join([n.strip("$") for n in names]) + ")"
  
file_path: pymc/pymc/printing.py
imports: from typing import Union
  from pytensor.compile import SharedVariable
  from pytensor.graph.basic import Constant, walk
  from pytensor.tensor.basic import TensorVariable, Variable
  from pytensor.tensor.elemwise import DimShuffle
  from pytensor.tensor.random.basic import RandomVariable
  from pytensor.tensor.random.var import RandomGeneratorSharedVariable, RandomStateSharedVariable
  from pymc.model import Model
label_desc: Use image node_id 7 for calling a global function with example usage: _str_for_expression(var, formatting) and returns: unknown, unknown, reversed