<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_namespace(attribute, namespace_splitter=NAMESPACE_SPLITTER, root_only=False):
 """ Returns attribute with stripped foundations.namespace. Usage:: u'child' u'parent|child' :param attribute: Attribute. :type attribute: unicode :param namespace_splitter: Namespace splitter character. :type namespace_splitter: unicode :param root_only: Remove only root foundations.namespace. :type root_only: bool :return: Attribute without foundations.namespace. :rtype: unicode """


    attribute_tokens = attribute.split(namespace_splitter)
    stripped_attribute = root_only and namespace_splitter.join(attribute_tokens[1:]) or \
                         attribute_tokens[len(attribute_tokens) - 1]
    LOGGER.debug("> Attribute: '{0}', stripped attribute: '{1}'.".format(attribute, stripped_attribute))
    return stripped_attribute