Studies on structure stability and analytical applications of transition metal complexes of thiosemicarbazones and semicarbazones