Given a Riemannian manifold $(M,g)$ and a symmetric $2$-tensor field $h$, what is meant by $\langle\mathrm{Ric},h\rangle_g$? Given a Riemannian manifold $(M,g)$, I know $\langle X_1,X_2\rangle_g$ is defined for vector fields $X_1,X_2$: it is used to denote the inner product $g_p(X_1|_p,X_2|_p)$ with $p$ running through $M$. But what if we are given a symmetric $2$-tensor field $h$ and asked to define $\langle\mathrm{Ric},h\rangle_g$? $\mathrm{Ric}$ is the Ricci tensor, which is also a symmetric $2$-tensor field. I saw this mysterious notation in articles about linearization of the scalar curvature but have no idea about it.
Let's generalize the result and consider any pair of covariant $2$-tensor fields $h_1,h_2$. An analogy with $\langle X_1,X_2\rangle_g$ leads me to think about
$$g_p(h_1|_p,h_2|_p).$$
Literally, both $h_1|_p$ and $h_2|_p$ are covariant $2$-tensors, which are typically viewed as bilinear forms on $T_p M$ rather than vectors in $T_p M$. That way, how do I make sense of their inner product under $g_p$? Thank you.
Edit 1. I came across this notation in Geometric Relativity written by Dan A. Lee, but it can be found in many articles talking about deformations, and strangely these articles just don't give further explanations to this notation, which is why I'm here. Okay, let me enclose a snapshot of Lee's book:



Edit 2. If one follows the book by John M. Lee to learn Riemannian geometry, he/she can go to Proposition 2.40 of the 2nd edition for detailed explanations.
 A: Let’s work purely at the level of vector spaces. The manifold case follows by doing this pointwise at each tangent space.
Let $V$ be a finite-dimensional vector space over $\Bbb{R}$, and $g:V\times V\to\Bbb{R}$ a bilinear symmetric non-degenerate map. As you may know, this gives rise to a linear isomorphism $g^{\flat}:V\to V^*$, $g^{\flat}(v)=g(v,\cdot)$ (this is essentially the definition of non-degeneracy). The pair $(V,g)$ is a pseudo inner-product space. Now, by transporting structure via $g^{\flat}$, we get a pseudo inner-product space $(V^*,\tilde{g})$; explicitly, $\tilde{g}=(g^{\flat})_*g$, which even more explicitly means $\tilde{g}(\cdot,\cdot)=g(g^{\sharp}(\cdot),g^{\sharp}(\cdot))$.
The question now becomes whether it is possible to define a pseudo inner-product $T^r_s(g)$ on the various tensor spaces $T^r_s(V)= V^{\otimes r}\otimes (V^*)^{\otimes s}$ (hopefully you recognize the special cases $T^1_0(g)=g$, and $T^0_1(g)=\tilde{g}$; also it’s common to write simply $\langle\cdot,\cdot\rangle_g$, letting context distinguish the meaning, instead of $T^r_s(g)$ to mean the pseudo inner-product induced by $g$ on the tensor spaces). The answer is yes.
To define the pseudo inner-product on $T^r_s(V)$, we’ll invoke the universal property of tensor products. Set $W=V^{r}\times (V^{*})^{s}$ (Cartesian product, not tensor product), and consider the map $W\times W\to\Bbb{R}$,
\begin{align}
&\left((v_1,\dots, v_r,\alpha^1,\dots,\alpha^s),(w_1,\dots, w_r,\beta^1\dots,\beta^s)\right)\\
\mapsto &g(v_1,w_1)\cdots g(v_r,w_r)\cdot \tilde{g}(\alpha^1,\beta^1)\cdots \tilde{g}(\alpha^s,\beta^s).
\end{align}
This map, is clearly bilinear $W\times W\to\Bbb{R}$, and it is also $2(r+s)$-fold multilinear. Hence, by the universal property of tensor products, this map descends uniquely to a bilinear map $T^r_s(g):T^r_s(V)\times T^r_s(V)\to\Bbb{R}$ such that its action on pure tensors is as above:
\begin{align}
&(T^r_sg)\left(v_1\otimes\dots\otimes v_r\otimes\alpha^1\otimes\dots\otimes\alpha^s, w_1\otimes\dots\otimes w_r\otimes\beta^1\otimes\dots\otimes\beta^s\right)\\
=&g(v_1,w_1)\cdots g(v_r,w_r)\cdot \tilde{g}(\alpha^1,\beta^1)\cdots \tilde{g}(\alpha^s,\beta^s).
\end{align}
Checking non-degeneracy of $T^r_s(g)$ is possible, but it’s slightly painful.
So, in the special case of $r=0,s=2$, $T^0_2g$ is the unique bilinear map on $T^0_2(V)$ such that its effect on the pure $(0,2)$ tensors is $(T^0_2g)(\alpha^1\otimes\alpha^2,\beta^1\otimes\beta^2)=\tilde{g}(\alpha^1,\beta^1)\cdot \tilde{g}(\alpha^2,\beta^2)$.

If you prefer in index notation, then for each pair of indices you find in the matching location, you contract with $g$ or $\tilde{g}$: for any $(r,s)$ tensors $A,B$ over $V$,
\begin{align}
(T^r_sg)(A,B)=g_{a_1b_1}\cdots g_{a_rb_r}g^{\mu_1\nu_1}\cdots g^{\mu_s\nu_s}A^{a_1\dots a_r}_{\,\,\,\,\quad\mu_1\dots\mu_s} B^{b_1\dots b_r}_{\,\,\,\,\quad\nu_1\dots\nu_s},
\end{align}
or specializing to the $(0,2)$ case,
\begin{align}
(T^0_2g)(A,B)&=g^{\mu_1\nu_1}g^{\mu_2\nu_2}A_{\mu_1\mu_2}B_{\nu_1\nu_2}.
\end{align}
So, if you like the index raising/lowering game, then you can write this as $A^{\mu_1\mu_2}B_{\mu_1\mu_2}$.
A: It simply means the contraction their respective indices:
$$R_{\alpha \beta} h^{\alpha \beta}$$
or any other equivalent contraction.
Abstract notation is not very practical beyond a certain (very low) threshold.
