(
            current_val,
            extracted_value,
            keep_multi,
            merge_values,
            type_list)
return extracted_value[0]
Returns the attribute value as it should be stored.

        Args:
            current_val: current value of store_as.
            extracted_value: values matched from regexp (type list).
            keep_multi: choice if you keep all match from regex (type boolean).
            merge_values: choice if you merge value from extracted
                 and current (type boolean).
            type_list: choice if you store values in list type(type boolean).

        Returns:
            Value to store
Returns the attribute value as it should be stored.
Returns the attribute value as it should be stored .
def _get_attribute_value(
            current_val,
            extracted_value,
            keep_multi,
            merge_values,
            type_list):
        """Returns the attribute value as it should be stored.

        Args:
            current_val: current value of store_as.
            extracted_value: values matched from regexp (type list).
            keep_multi: choice if you keep all match from regex (type boolean).
            merge_values: choice if you merge value from extracted
                 and current (type boolean).
            type_list: choice if you store values in list type(type boolean).

        Returns:
            Value to store
        """
        if not current_val:
            merge_values = False
        if len(extracted_value) == 1:
            keep_multi = False
        if type_list:
            if merge_values and keep_multi:
                return sorted(list(set(current_val) | set(extracted_value)))
            if merge_values:
                if extracted_value[0] not in current_val:
                    current_val.append(extracted_value[0])
                return sorted(current_val)
            if keep_multi:
                return sorted(extracted_value)
            return [extracted_value[0]]
        if merge_values and keep_multi:
            list_cur = current_val.split(',')
            merge_list = sorted(list(set(list_cur) | set(extracted_value)))
            return ','.join(merge_list)
        if merge_values:
            if extracted_value[0] in current_val:
                return current_val
            return f'{current_val},{extracted_value[0]}'
        if keep_multi:
            return ','.join(extracted_value)
        return extracted_value[0]
def _get_attribute_value ( current_val , extracted_value , keep_multi , merge_values , type_list ) : if not current_val : merge_values = False if len ( extracted_value ) == 1 : keep_multi = False if type_list : if merge_values and keep_multi : return sorted ( list ( set ( current_val ) | set ( extracted_value ) ) ) if merge_values : if extracted_value [ 0 ] not in current_val : current_val . append ( extracted_value [ 0 ] ) return sorted ( current_val ) if keep_multi : return sorted ( extracted_value ) return [ extracted_value [ 0 ] ] if merge_values and keep_multi : list_cur = current_val . split ( ',' ) merge_list = sorted ( list ( set ( list_cur ) | set ( extracted_value ) ) ) return ',' . join ( merge_list ) if merge_values : if extracted_value [ 0 ] in current_val : return current_val return f'{current_val},{extracted_value[0]}' if keep_multi : return ',' . join ( extracted_value ) return extracted_value [ 0 ]