<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_authentication(self, public_key, authentication_type=None):
 """ Add a authentication public key id and type to the list of authentications. :param key_id: Key id, Authentication :param authentication_type: Authentication type, str """

        authentication = {}
        if public_key:
            authentication = {'type': authentication_type, 'publicKey': public_key}
        logger.debug(f'Adding authentication {authentication}')
        self._authentications.append(authentication)