In General Relativity, one possible way to decide if a space-time [i.e. a Lorentzian Manifold $(\mathcal{M}, \textbf{g})$ where $\textbf{g}$ is an arbitrary metric tensor.] is a "resonable physical" $[1]$ one, is then check the so called Energy Conditions $[2]$, for exemple:
A physical Space-time is the one who satisfies both:
\begin{cases} G_{\mu \nu} =: R_{\mu \nu} - \frac{1}{2}Rg_{\mu \nu} = \frac{8\pi G}{c^{4}}T_{\mu \nu}\\ T_{\mu \nu}u^{\mu}u^{\nu}\geq 0 \end{cases}
Where $T_{\mu \nu}u^{\mu}u^{\nu}\geq 0$ for all timelike vectors $u^{\alpha}$ is called the Weak Energy Condition (WEC).
Now, if you have a metric and energy-momentum tensor you can calculate almost all the basic quantities in GR, including the WEC. Knowing that fact, consider then this Python Code for SageManifolds:
How can I calculate the WEC based on this code? (I used this example because the author have used a perfect fluid energy-momentum tensor, also, he defined the 4-(time-like) vectors and 4-(time-like) dual vectors (covectors or one-forms)
$$ * * * $$
$[1]$ WALD.R., General Relativity. Chicago University Press. pages 211-219. Chicago, 1984
$[2]$ LOBO.F.S.N., Fundamental Theories of Physics: Wormholes, Warp Drives and Energy Conditions. Springer. pages 193-196.vol 186. Switzerland. 2017.