Generalize algorithm of detection low PSL code using templates to independence from type of container.