<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_string(values, separator, remove_duplicates = False):
 """ Splits specified string into elements using a separator and assigns the elements to a newly created AnyValueArray. :param values: a string value to be split and assigned to AnyValueArray :param separator: a separator to split the string :param remove_duplicates: (optional) true to remove duplicated elements :return: a newly created AnyValueArray. """

        result = AnyValueArray()

        if values == None or len(values) == 0:
            return result

        items = str(values).split(separator)
        for item in items:
            if (item != None and len(item) > 0) or remove_duplicates == False:
                result.append(item)

        return result