<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _blackbox_partial_noise(blackbox, system):
 """Noise connections from hidden elements to other boxes."""

        # Noise inputs from non-output elements hidden in other boxes
        node_tpms = []
        for node in system.nodes:
            node_tpm = node.tpm_on
            for input_node in node.inputs:
                if blackbox.hidden_from(input_node, node.index):
                    node_tpm = marginalize_out([input_node], node_tpm)

            node_tpms.append(node_tpm)

        tpm = rebuild_system_tpm(node_tpms)

        return system._replace(tpm=tpm)