original_docstring: helper method to filter models by an attribute. This allows for
          :py:class:`~uiclasses.ModelList` to
          :py:meth:`~uiclasses.ModelList.filter_by`.
          
docstring: helper method to filter models by an attribute. This allows for
docstring_tokens: helper method to filter models by an attribute . This allows for
code: def attribute_matches(
          self, attribute_name: str, fnmatch_pattern: str
      ) -> bool:
  
          """helper method to filter models by an attribute. This allows for
          :py:class:`~uiclasses.ModelList` to
          :py:meth:`~uiclasses.ModelList.filter_by`.
          """
          value = getattr(self, attribute_name, self.get(attribute_name))
          if isinstance(fnmatch_pattern, str):
              return fnmatch(value or "", fnmatch_pattern or "")
          else:
              return value == fnmatch_pattern
code_tokens: def attribute_matches ( self , attribute_name : str , fnmatch_pattern : str ) -> bool : value = getattr ( self , attribute_name , self . get ( attribute_name ) ) if isinstance ( fnmatch_pattern , str ) : return fnmatch ( value or "" , fnmatch_pattern or "" ) else : return value == fnmatch_pattern
short_docstring: helper method to filter models by an attribute.
short_docstring_tokens: helper method to filter models by an attribute .
comment: """helper method to filter models by an attribute. This allows for
          :py:class:`~uiclasses.ModelList` to
          :py:meth:`~uiclasses.ModelList.filter_by`.
          """