def METHOD_NAME(
    cluster_manager: cluster_management.ClusterManager,
    cluster_obj: clusterlib.ClusterLib,
    temp_template: str,
) -> tp.Tuple[tp.Set[str], tp.Set[str]]:
    """Detect if one or more nodes have forked blockchain or is out of sync."""
    forked_nodes: tp.Set[str] = set()
    unsynced_nodes: tp.Set[str] = set()
    known_nodes = cluster_nodes.get_cluster_type().NODES
    if len(known_nodes) <= 1:
        LOGGER.warning("WARNING: Not enough nodes available to detect forks, skipping the check.")
        return forked_nodes, unsynced_nodes
    instance_num = cluster_nodes.get_instance_num()
    # create a UTxO
    payment_rec = cluster_obj.g_address.gen_payment_addr_and_keys(
        name=temp_template,
    )
    tx_raw_output = clusterlib_utils.fund_from_faucet(
        payment_rec,
        cluster_obj=cluster_obj,
        faucet_data=cluster_manager.cache.addrs_data["user1"],
        amount=2_000_000,
    )
    assert tx_raw_output
    utxos = cluster_obj.g_query.get_utxo(tx_raw_output=tx_raw_output)
    # check if all nodes know about the UTxO
    for node in known_nodes:
        # set 'CARDANO_NODE_SOCKET_PATH' to point to socket of the selected node
        cluster_nodes.set_cluster_env(instance_num=instance_num, socket_file_name=f"{node}.socket")
        for __ in range(5):
            if float(cluster_obj.g_query.get_tip()["syncProgress"]) == 100:
                break
            time.sleep(1)
        else:
            unsynced_nodes.add(node)
            continue
        if not cluster_obj.g_query.get_utxo(utxo=utxos):
            forked_nodes.add(node)
    # restore 'CARDANO_NODE_SOCKET_PATH' to original value
    cluster_nodes.set_cluster_env(instance_num=instance_num)
    # forked nodes are the ones that differ from the majority of nodes
    if forked_nodes and len(forked_nodes) > (len(known_nodes) // 2):
        forked_nodes = known_nodes - forked_nodes
    return forked_nodes, unsynced_nodes