code: def get_bool_attr(self, name):
      
      val = self.get_attr(name)
      return val is not None and val.lower() in ("true", name)
docs: Returns the value of a boolean HTML attribute like `checked` or `disabled`