code: def require(predicate):
      
  
      def decorator(method):
          @functools.wraps(method)
          def wrapper(*args, **kwargs):
              if predicate():
                  return method(*args, **kwargs)
              return None
  
          return wrapper
  
      return decorator
docs: Decorator factory for methods requiring a predicate. If the
      predicate is not fulfilled during a method call, the method call
      is skipped and None is returned.
  
      :param predicate: A callable returning a truth value
      :returns: Method decorator
  
      .. seealso::
  
          :py:class:`internet`