code: def is_active(self, path):
          
          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
docs: Check if given path is active for current item