code: def add_to_matching_blacklist(session, term):
      
      if term is None:
          raise ValueError("'term' to blacklist cannot be None")
      if term == '':
          raise ValueError("'term' to blacklist cannot be an empty string")
  
      mb = MatchingBlacklist(excluded=term)
      session.add(mb)
  
      return mb
docs: Add term to the matching blacklist.
  
      This function adds a `term` to the matching blacklist.
      The term to add cannot have a `None` or empty value,
      on this case an `ValueError` will be raised.
  
      :param session: database session
      :param term: term, word or value to blacklist
  
      :return: a new entry in the blacklist
  
      :raises ValueError: raised when `term` is `None` or an empty string