<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getParentElementCustomFilter(self, filterFunc):
        '''
            getParentElementCustomFilter - Runs through parent on up to document root, returning the

                                              first tag which filterFunc(tag) returns True.

                @param filterFunc <function/lambda> - A function or lambda expression that should return "True" if the passed node matches criteria.

                @return <AdvancedTag/None> - First match, or None


                @see getFirstElementCustomFilter for matches against children
        '''
        parentNode = self.parentNode
        while parentNode:

            if filterFunc(parentNode) is True:
                return parentNode

            parentNode = parentNode.parentNode

        return None