code: def test_reblock_2x2():
      B = BlockMatrix(
          [
              [MatrixSymbol("A_%d%d" % (i, j), 2, 2) for j in range(3)]
              for i in range(3)
          ]
      )
      assert B.blocks.shape == (3, 3)
  
      BB = reblock_2x2(B)
      assert BB.blocks.shape == (2, 2)
  
      assert B.shape == BB.shape
      assert B.as_explicit() == BB.as_explicit()
  
imports: from sympy.matrices.expressions.trace import Trace
  from sympy.testing.pytest import raises, slow
  from sympy.matrices.expressions.blockmatrix import block_collapse, bc_matmul, bc_block_plus_ident, BlockDiagMatrix, BlockMatrix, bc_dist, bc_matadd, bc_transpose, bc_inverse, blockcut, reblock_2x2, deblock
  from sympy.matrices.expressions import MatrixSymbol, Identity, trace, det, ZeroMatrix, OneMatrix
  from sympy.matrices.expressions.inverse import Inverse
  from sympy.matrices.expressions.matpow import MatPow
  from sympy.matrices.expressions.transpose import Transpose
  from sympy.matrices.exceptions import NonInvertibleMatrixError
  from sympy.matrices import Matrix, ImmutableMatrix, ImmutableSparseMatrix, zeros
  from sympy.core import Tuple, Expr, S, Function
  from sympy.core.symbol import Symbol, symbols
  from sympy.functions import transpose, im, re
label_desc: Use image node_id 23 for calling a global function with example usage: test_reblock_2x2() without return types