code: def _get_authentication_from_public_key_id(self, key_id):
          
          for authentication in self._authentications:
              if authentication.is_key_id(key_id):
                  return authentication
          return None
docs: Return the authentication based on it's id.