code: def _(expr):
      allargs_square = allargs(x, Q.square(x), expr)
      allargs_invertible = allargs(x, Q.invertible(x), expr)
      return Implies(
          allargs_square,
          Equivalent(Q.invertible(expr), allargs_invertible),
      )
  
imports: from collections import defaultdict
  from sympy.assumptions.ask import Q
  from sympy.core import Add, Mul, Pow, Number, NumberSymbol, Symbol
  from sympy.core.numbers import ImaginaryUnit
  from sympy.functions.elementary.complexes import Abs
  from sympy.logic.boolalg import Equivalent, And, Or, Implies
  from sympy.matrices.expressions import MatMul
label_desc: Use image node_id 12 for calling a global function with example usage: _(expr) and returns: Implies