code: def get_value_from_summary_string(tag, summary_str):
      """get_value_from_summary_string.
  
      Retrieve a summary value from a summary string.
  
      Arguments:
          tag: `str`. The summary tag (name).
          summary_str: `str`. The summary string to look in.
  
      Returns:
          A `float`. The retrieved value.
  
      Raises:
          `Exception` if tag not found.
  
      """
  
      # Compatibility hotfix for the seq2seq example
      if tag == "acc:0/":
          tag = "acc_0/"
  
      # Fix for TF 0.12
      if tag[-1] == "/":
          tag = tag[:-1]
      summ = summary_pb2.Summary()
      summ.ParseFromString(summary_str)
  
      for row in summ.value:
          if row.tag.endswith(tag):
              return float(row.simple_value)
  
      raise ValueError(
          "Tag: " + tag + " cannot be found in summaries list."
      )
  
file_path: tflearn/tflearn/summaries.py
imports: from __future__ import division, print_function, absolute_import
  import tensorflow.compat.v1
  from tensorflow.core.framework import summary_pb2
  from .utils import format_scope_name
label_desc: Use image node_id 6 for calling a global function with example usage: get_value_from_summary_string(tag, summary_str) and returns: float