In this paper we introduce a spectrum-preserving relation between graphs with loops and graphs without loops. Our approach generalizes the spectral results obtained on \((m,k)-\) stars to a wider class of graphs, namely \((m,k,s)-\) stars with or without loops. The proposed equivalence of the two classes of graphs allows to study pseudographs as simple graphs, by extending the techniques developed for simple graphs to pseudographs, without losing information, and it could be relevant for applications of graph theory to complex systems physics and neural networks. Finally, in order to make the demonstrated results easily applicable, we have provided a public Github repository where Python code that allows straightforward implementations of the outcomes is made available.