code: def max(self, spec):
          
          if not isinstance(spec, (list, tuple)):
              raise TypeError("spec must be an instance of list or tuple")
  
          self.__check_okay_to_chain()
          self.__max = SON(spec)
          return self
docs: Adds `max` operator that specifies upper bound for specific index.
  
          :Parameters:
            - `spec`: a list of field, limit pairs specifying the exclusive
              upper bound for all keys of a specific index in order.
  
          .. versionadded:: 2.7