code: def solve(expr, value):
      """
      Tries to solve for free inputs of an ``expr`` such that ``expr == value``,
      and computes the log-abs-det-Jacobian of the resulting substitution.
  
      :param Funsor expr: An expression with a free variable.
      :param Funsor value: A target value.
      :return: A tuple ``(name, point, log_abs_det_jacobian)``
      :rtype: tuple
      :raises: ValueError
      """
      assert isinstance(expr, Funsor)
      assert isinstance(value, Funsor)
      result = solve.dispatch(
          type(expr), *(expr._ast_values + (value,))
      )
      if result is None:
          raise ValueError(
              "Cannot substitute into a Delta: {}".format(value)
          )
      return result
  
imports: from collections import OrderedDict
  from functools import reduce
  from funsor.domains import Domain, Real
  from funsor.instrument import debug_logged
  from funsor.ops import AddOp, SubOp, TransformOp
  from funsor.registry import KeyedRegistry
  from funsor.terms import Align, Binary, Funsor, FunsorMeta, Independent, Lambda, Number, Unary, Variable, eager, to_funsor
  from funsor.util import get_default_dtype
  from .None import ops
label_desc: Use image node_id 1 for calling a global function with example usage: solve(expr, value) and returns: result