code: def get_persisted_value_from_ensemble(ensemble, key):
      """Return constant persisted tensor values from the previous subnetwork.
  
      Args:
        ensemble: Previous ensemble.
        key: Name of constant to get from eprsisted tensor.
  
      Returns:
        int|float value of the constant.
      """
      previous_subnetwork = ensemble.weighted_subnetworks[-1].subnetwork
      persisted_tensor = previous_subnetwork.shared[key]
      return persisted_tensor
  
imports: from __future__ import absolute_import
  from __future__ import division
  import copy
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: get_persisted_value_from_ensemble(ensemble, key) and returns: persisted_tensor