Text this: On one class of extensions of Lie algebras and the Casimir functions related to it