code: def checkinfsol(eq, infinitesimals, func=None, order=None):
      r"""
      This function is used to check if the given infinitesimals are the
      actual infinitesimals of the given first order differential equation.
      This method is specific to the Lie Group Solver of ODEs.
  
      As of now, it simply checks, by substituting the infinitesimals in the
      partial differential equation.
  
  
      .. math:: \frac{\partial \eta}{\partial x} + \left(\frac{\partial \eta}{\partial y}
                  - \frac{\partial \xi}{\partial x}\right)*h
                  - \frac{\partial \xi}{\partial y}*h^{2}
                  - \xi\frac{\partial h}{\partial x} - \eta\frac{\partial h}{\partial y} = 0
  
  
      where `\eta`, and `\xi` are the infinitesimals and `h(x,y) = \frac{dy}{dx}`
  
      The infinitesimals should be given in the form of a list of dicts
      ``[{xi(x, y): inf, eta(x, y): inf}]``, corresponding to the
      output of the function infinitesimals. It returns a list
      of values of the form ``[(True/False, sol)]`` where ``sol`` is the value
      obtained after substituting the infinitesimals in the PDE. If it
      is ``True``, then ``sol`` would be 0.
  
      """
      if isinstance(eq, Equality):
          eq = eq.lhs - eq.rhs
      if not func:
          eq, func = _preprocess(eq)
      variables = func.args
      if len(variables) != 1:
          raise ValueError("ODE's have only one independent variable")
      else:
          x = variables[0]
          if not order:
              order = ode_order(eq, func)
          if order != 1:
              raise NotImplementedError(
                  "Lie groups solver has been implemented "
                  "only for first order differential equations"
              )
          else:
              df = func.diff(x)
              a = Wild("a", exclude=[df])
              b = Wild("b", exclude=[df])
              match = collect(expand(eq), df).match(a * df + b)
  
              if match:
                  h = -simplify(match[b] / match[a])
              else:
                  try:
                      sol = solve(eq, df)
                  except NotImplementedError:
                      raise NotImplementedError(
                          "Infinitesimals for the "
                          "first order ODE could not be found"
                      )
                  else:
                      h = sol[0]  # Find infinitesimals for one solution
  
              y = Dummy("y")
              h = h.subs(func, y)
              xi = Function("xi")(x, y)
              eta = Function("eta")(x, y)
              dxi = Function("xi")(x, func)
              deta = Function("eta")(x, func)
              pde = (
                  eta.diff(x)
                  + (eta.diff(y) - xi.diff(x)) * h
                  - (xi.diff(y)) * h**2
                  - xi * (h.diff(x))
                  - eta * (h.diff(y))
              )
              soltup = []
              for sol in infinitesimals:
                  tsol = {
                      xi: S(sol[dxi]).subs(func, y),
                      eta: S(sol[deta]).subs(func, y),
                  }
                  sol = simplify(pde.subs(tsol).doit())
                  if sol:
                      soltup.append((False, sol.subs(y, func)))
                  else:
                      soltup.append((True, 0))
              return soltup
  
imports: from sympy.core import Add, S, Mul, Pow, oo
  from sympy.core.containers import Tuple
  from sympy.core.expr import AtomicExpr, Expr
  from sympy.core.function import Function, Derivative, AppliedUndef, diff, expand, expand_mul, Subs
  from sympy.core.multidimensional import vectorize
  from sympy.core.numbers import nan, zoo, Number
  from sympy.core.relational import Equality, Eq
  from sympy.core.sorting import default_sort_key, ordered
  from sympy.core.symbol import Symbol, Wild, Dummy, symbols
  from sympy.core.sympify import sympify
  from sympy.core.traversal import preorder_traversal
  from sympy.logic.boolalg import BooleanAtom, BooleanTrue, BooleanFalse
  from sympy.functions import exp, log, sqrt
  from sympy.functions.combinatorial.factorials import factorial
  from sympy.integrals.integrals import Integral
  from sympy.polys import Poly, terms_gcd, PolynomialError, lcm
  from sympy.polys.polytools import cancel
  from sympy.series import Order
  from sympy.series.series import series
  from sympy.simplify import collect, logcombine, powsimp, separatevars, simplify, cse
  from sympy.simplify.radsimp import collect_const
  from sympy.solvers import checksol, solve
  from sympy.utilities import numbered_symbols
  from sympy.utilities.iterables import uniq, sift, iterable
  from sympy.solvers.deutils import _preprocess, ode_order, _desolve
  from .single import SingleODEProblem, SingleODESolver, solver_map
label_desc: Use image node_id 28 for calling a global function with example usage: checkinfsol(eq, infinitesimals, func, order) and returns: soltup