Suppose there is an array of tags:
array('name1'=>'metka1', 'name2'=>'metka2', 'name3'=>'metka1')... the key is the name of the record, and the value is respectively the label that you want to assign to this record by name.
Those. you must first create a programmatically new labels from the array, then assign these labels to the records that correspond to these labels in the array.
How to implement it?