code: def is_tag_matched(self, tag, **attribute_filter):
          
          if len(attribute_filter) <= 0:
              return True
          for attr, value in attribute_filter.items():
              # TODO: figure out if both android:name and name tag exist which one to give preference
              _value = tag.get(self._ns(attr))
              if _value is None:
                  log.warning("Failed to get the attribute with namespace")
                  _value = tag.get(attr)
              if _value != value:
                  return False
          return True
docs: Return true if the attributes matches in attribute filter
          :param tag: specify the tag element
          :type tag: Element
          :param attribute: specify the attribute
          :type attribute: string