code: def transinv_to_invtrans(fgraph, node):
      if is_matrix_transpose(node.outputs[0]):
          (A,) = node.inputs
          if (
              A.owner
              and isinstance(A.owner.op, Blockwise)
              and isinstance(A.owner.op.core_op, MatrixInverse)
          ):
              (X,) = A.owner.inputs
              return [A.owner.op(node.op(X))]
  
imports: import logging
  from typing import cast
  from pytensor.graph.rewriting.basic import copy_stack_trace, node_rewriter
  from pytensor.tensor.basic import TensorVariable, diagonal, swapaxes
  from pytensor.tensor.blas import Dot22
  from pytensor.tensor.blockwise import Blockwise
  from pytensor.tensor.elemwise import DimShuffle
  from pytensor.tensor.math import Dot, Prod, _matrix_matrix_matmul, log, prod
  from pytensor.tensor.nlinalg import MatrixInverse, det
  from pytensor.tensor.rewriting.basic import register_canonicalize, register_specialize, register_stabilize
  from pytensor.tensor.slinalg import Cholesky, Solve, SolveBase, cholesky, solve, solve_triangular
label_desc: Use image node_id 3 for calling a global function with example usage: transinv_to_invtrans(fgraph, node) and returns: list