docs: def ssh_compute_add(public_key, application_name, rid=None, unit=None,
                      user=None):
      """Add a compute nodes ssh details to local cache.
  
      Collect various hostname variations and add the corresponding host keys to
      the local known hosts file. Finally, add the supplied public key to the
      authorized_key file.
  
      :param public_key: Public key.
      :type public_key: str
      :param application_name: Name of application eg nova-compute-something
      :type application_name: str
      :param rid: Relation id of the relation between this charm and the app. If
                  none is supplied it is assumed its the relation relating to
                  the current hook context.
      :type rid: str
      :param unit: Unit to add ssh asserts for if none is supplied it is assumed
                   its the unit relating to the current hook context.
      :type unit: str
      :param user: The user that the ssh asserts are for.
      :type user: str
      """
      relation_data = relation_get(rid=rid, unit=unit)
      ssh_compute_add_host_and_key(
          public_key,
          relation_data.get('hostname'),
          relation_data.get('private-address'),
          application_name,
          user=user)