code: def get_public_key(self, key_id, is_search_embedded=False):
          
          if isinstance(key_id, int):
              return self._public_keys[key_id]
  
          for item in self._public_keys:
              if item.get_id() == key_id:
                  return item
  
          if is_search_embedded:
              for authentication in self._authentications:
                  if authentication.get_public_key_id() == key_id:
                      return authentication.get_public_key()
          return None
docs: Key_id can be a string, or int. If int then the index in the list of keys.