code: def _verified_algorithm_from_id(algorithm_id):
      # type: (int) -> AlgorithmSuite
      
      try:
          algorithm_suite = AlgorithmSuite.get_by_id(algorithm_id)
      except KeyError as error:
          raise UnknownIdentityError("Unknown algorithm {}".format(algorithm_id), error)
  
      if not algorithm_suite.allowed:
          raise NotSupportedError("Unsupported algorithm: {}".format(algorithm_suite))
  
      return algorithm_suite
docs: Load a message :class:`AlgorithmSuite` for the specified algorithm suite ID.
  
      :param int algorithm_id: Algorithm suite ID
      :return: Algorithm suite
      :rtype: AlgorithmSuite
      :raises UnknownIdentityError: if unknown algorithm ID is received
      :raises NotSupportedError: if unsupported algorithm ID is received