Added match_entity method to PyFilter.

The method allows using a filter to match a single entity.