code: def _(expr: ArrayContraction, x: Expr):
      fd = array_derive(expr.expr, x)
      rank_x = len(get_shape(x))
      contraction_indices = expr.contraction_indices
      new_contraction_indices = [
          tuple(j + rank_x for j in i) for i in contraction_indices
      ]
      return _array_contraction(fd, *new_contraction_indices)
  
imports: import operator
  from functools import reduce, singledispatch
  from sympy.core.expr import Expr
  from sympy.core.singleton import S
  from sympy.matrices.expressions.hadamard import HadamardProduct
  from sympy.matrices.expressions.inverse import Inverse
  from sympy.matrices.expressions.matexpr import MatrixExpr, MatrixSymbol
  from sympy.matrices.expressions.special import Identity, OneMatrix
  from sympy.matrices.expressions.transpose import Transpose
  from sympy.combinatorics.permutations import _af_invert
  from sympy.matrices.expressions.applyfunc import ElementwiseApplyFunction
  from sympy.tensor.array.expressions.array_expressions import _ArrayExpr, ZeroArray, ArraySymbol, ArrayTensorProduct, ArrayAdd, PermuteDims, ArrayDiagonal, ArrayElementwiseApplyFunc, get_rank, get_shape, ArrayContraction, _array_tensor_product, _array_contraction, _array_diagonal, _array_add, _permute_dims, Reshape
  from sympy.tensor.array.expressions.from_matrix_to_array import convert_matrix_to_array
label_desc: Use image node_id 14 for calling a global function with example usage: _(expr, x) and returns: _array_contraction