def _get_harvester_connection_msg(
    farmer_id: str,
    harvester_id: str,
    ip_address: str,
    is_connected: bool,
) -> str:
    """Get the connection msg for a harvester

    Parameters
    ----------
    farmer_id : str
        id of the farmer
    harvester_id : str
        id of the harvester
    ip_address : str
        harvester ip address
    is_connected: bool
        connection status

    Returns
    -------
    msg : str
        harvester connection message
    """

    # send message
    icon = "🟢" if is_connected else "🟠"
    connection_status = "connected" if is_connected else "disconnected"

    CONNECTION_MSG: str = "{icon} Farmer {farmer_id} {status} to Harvester {harvester_id} ({ip})."
    msg = CONNECTION_MSG.format(
        icon=icon,
        harvester_id=harvester_id[:10],
        ip=ip_address,
        status=connection_status,
        farmer_id=farmer_id,
    )

    return msg