code: def _validate_currency(self, currency):
          
          if currency not in self.major_currencies:
              raise InvalidCurrencyError(
                  'Invalid major currency \'{}\'. Choose from {}.'
                  .format(currency, tuple(self.major_currencies))
              )
docs: Check if the given order book is valid.
  
          :param currency: Major currency name in lowercase.
          :type currency: str | unicode
          :raise InvalidCurrencyError: If an invalid major currency is given.