class_docstr: Allows constant time lookups of graphdef nodes by common properties.
class_docstr_tok: ["Allows","constant","time","lookups","of","graphdef","nodes","by","common","properties","."]
code: def __init__(self, graph_def):
      self.graph_def = graph_def
      self.by_op = defaultdict(list)
      self.by_name = dict()
      self.by_input = defaultdict(list)
      for node in graph_def.node:
          self.by_op[node.op].append(node)
          assert (
              node.name not in self.by_name
          )  # names should be unique I guess?
          self.by_name[node.name] = node
          for input_name in node.input:
              self.by_input[input_name].append(node)
  
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 1 to create a new GraphDefHelper object from inherited base classes: object with example: obj = GraphDefHelper(graph_def)