Modify the stiffness matrix before assembly

Hi everyone!
As is well known, finite element assembly can be represented in the following form
image

The matrices R^(m) are the standard Boolean matrices which provide the
local-to-global correspondence of the numbering of the degrees of freedom.

If I want to perform some matrix operations before assembly.
For example,inverse of a matrix:

Can dolfinx do it?

The reason for doing this is that I need B as a preconditioner for my solver.
Form this paper:[Element-by-Element Schur Complement Approximations for General Nonsymmetric Matrices of Two-by-Two Block Form]

There are some demos with custom kernels here which might be of interest: Static condensation of linear elasticity — DOLFINx 0.10.0.0 documentation

Thanks bleyerj,
You reminded me that I can use components to define the inverse of a matrix.