code: def extract_metadata(graph_def):
      """Attempt to extract meta data hidden in graph_def.
  
      Looks for a `__lucid_metadata_json` constant string op.
      If present, extract it's content and convert it from json to python.
      If not, returns None.
      """
      meta_matches = [
          n for n in graph_def.node if n.name == metadata_node_name
      ]
      if meta_matches:
          assert (
              len(meta_matches) == 1
          ), "found more than 1 lucid metadata node!"
          meta_tensor = meta_matches[0].attr["value"].tensor
          return json.loads(meta_tensor.string_val[0])
      else:
          return None
  
file_path: lucid/lucid/modelzoo/util.py
imports: from __future__ import absolute_import, division, print_function
  import tensorflow
  import json
  from google.protobuf.message import DecodeError
  import logging
  import warnings
  from collections import defaultdict
  from itertools import chain
  from lucid.misc.io import load
  from lucid.misc.io.saving import ClarityJSONEncoder
label_desc: Use image node_id 6 for calling a global function with example usage: extract_metadata(graph_def) and returns: json, None