<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_active(self, path):
 """Check if given path is active for current item"""

        if self.url == '/' and self.url == path:
            return True
        elif self.url == '/':
            return False

        if self.url and path.startswith(self.url):
            return True

        if self.active_regex and re.compile(self.active_regex).match(path):
            return True

        for child in self.childs:
            if child.is_active(path):
                return True
        return False