The role of carbon in catalytically stabilized transition metal sulfides