We have,
T=2π√Ig
On squaring both sides, we get
T2=(2π√Ig)2
T2=4π2×Ig
T24π2=Ig
T24π2I=1g
g=4π2IT2
Hence, this is the answer.