code: def add_parent(self, parent_node, from_output, index=None):
      assert parent_node not in self.parents
      index = len(self.parents) if index is None else index
      self.parents.insert(index, (parent_node, from_output))
      if self not in parent_node.children:
          parent_node.children.append(self)
  
imports: from collections import namedtuple
  from functools import reduce
  from google.protobuf import text_format
  from copy import deepcopy
  import numbers
  import os
  import tempfile
  from mmdnn.conversion.caffe.mapper import get_handler_name
  from mmdnn.conversion.caffe.resolver import get_caffe_resolver, has_pycaffe
  from mmdnn.conversion.caffe.shape import *
  from mmdnn.conversion.caffe.errors import print_stderr, ConversionError
label_desc: Use image node_id 2 for calling the CaffeNode obj's underlying member method code with example usage: obj.add_parent(parent_node, from_output, index) without return types