code: def is_match(self, subject: Union[Expression, FlatTerm]) -> bool:
          
          try:
              next(self.match(subject))
          except StopIteration:
              return False
          return True
docs: Check if the given subject matches any pattern in the net.
  
          Args:
              subject:
                  The subject that is matched. Must be constant.
  
          Returns:
              True, if any pattern matches the subject.