code: def _validate(self):
          
          if self._method not in _RANK_METHODS:
              raise UnknownRankMethod(
                  method=self._method,
                  choices=set(_RANK_METHODS),
              )
          return super(Rank, self)._validate()
docs: Verify that the stored rank method is valid.