I have trouble understanding the graded ring $$\mathcal M(\Gamma)=\bigoplus_{k\in\mathbb{Z}}\mathcal M_k(\Gamma)$$ where $\mathcal M_k(\Gamma)$ is the ring/vector space of modular forms of weight $k$ with respect to $\Gamma$.
I asked a similar question earlier, but I didn't get a clear answer. My understanding of direct sums is very poor. I could only see them in two ways: (1) tuples with finitely many nonzero entries and (2) sum of finitely many elements from $\mathcal M_i(\Gamma)$.
The thing that confused me is that in Diamond's list of symbols, this graded ring is called "modular forms of all weights with respect to $\Gamma$".

However, if $f$ is an element of $\mathcal M(\Gamma)$, it has the form $f=g_1+g_2+\cdots+g_n$ where $g_i$ is homogeneous of degree $i$. This element $f$ is not necessarily a modular form, is it?
There is a comment from user Somos under my old question which says that
You have to understand the term "sum" correctly. It is a formal sum of components. In the same way that a vector in space $K^n$ is a sum of its coordinates. In other words, such a vector is not an element of $K$ but its coordinates are.
To my understanding, this comment confirms that an element of $\mathcal M(\Gamma)$ is not necessarily a modular form. I cannot see why Diamond calls this set "modular forms of all weights". Thanks in advance. Any help will be appreciated.
One way or another this is just an issue of language; you can call a finite sum of modular forms of possibly different weights an "inhomogeneous modular form" or something like that if it would make you happier.
Expanding on my comment, one way to define a ($\mathbb{Z}$-)graded ring is that it's a sequence $A_i, i \in \mathbb{Z}$ of abelian groups together with a family of bilinear maps
$$\cdot : A_i \otimes A_j \to A_{i+j}$$
satisfying associativity and so on. Thinking about graded rings in this way means you don't have to pick a particular forgetful functor to rings; you can if you want to consider the ordinary ring $\bigoplus_i A_i$ but you don't have to (you can also consider $\prod_i A_i$ which is often done e.g. in algebraic topology). Concretely, doing things this way amounts to only working with homogeneous elements, which here are genuinely modular forms.
But again this is just an issue of language. We want to consider this graded ring and it's called the ring of modular forms because its homogeneous elements are modular forms; that's all.