get_layer_from_attribute function

Get layer from attribute