class_docstr: The TFE Converter.
  
  Args:
      config: `Config` to use when constructing the TFE graph.
          Defaults to the current global TFE config.
      protocol: `Protocol` to use when constructing the TFE graph.
          Defaults to the current global TFE protocol.
class_docstr_tok: ["The","TFE","Converter",".","Args",":","config",":","`","Config","`","to","use","when","constructing","the","TFE","graph",".","Defaults","to","the","current","global","TFE","config",".","protocol",":","`","Protocol","`","to","use","when","constructing","the","TFE","graph",".","Defaults","to","the","current","global","TFE","protocol","."]
code: def _build_backward(
      self, model_proto, tfe_nodes, nodes_output, optimizer
  ):
      nodes = model_proto.graph.node
      graph_input = model_proto.graph.input
  
      def backward_function(d_y):
          dy_dict = {}
          for index, output in enumerate(model_proto.graph.output):
              dy_dict[output.name] = d_y[index]
          for node in reversed(nodes):
              d_y = []
              tfe_node = tfe_nodes[node.name]
              for output in node.output:
                  d_y.append(dy_dict[output])
  
              with tf.name_scope(node.name + "/backward"):
                  grad_weights, d_y = tfe_node.backward(d_y)
                  optimizer.apply_gradients(
                      tfe_node.weights, grad_weights
                  )
  
              index = 0
              for input in node.input:
                  if input in nodes_output:
                      dy_dict[input] = d_y[index]
                      index += 1
  
          res_dy = []
          for input in graph_input:
              res_dy.append(dy_dict[input.name])
          return res_dy
  
      return backward_function
  
imports: import functools
  from typing import Any
  from typing import List
  from typing import Optional
  from typing import Union
  import numpy
  import onnx
  import tensorflow
  import tf2onnx
  from onnx.mapping import TENSOR_TYPE_TO_NP_TYPE
  from onnx.onnx_ml_pb2 import ModelProto
  from tf2onnx import optimizer
  import tf_encrypted
  from tf_encrypted.config import Config
  from tf_encrypted.config import get_config
  from tf_encrypted.keras import optimizers
  from tf_encrypted.keras.models import BaseModel
  from tf_encrypted.player import Player
  from tf_encrypted.protocol import Protocol
  from tf_encrypted.protocol.protocol import TFETensor
  from .nodes import build_node
label_desc: Use image node_id 6 for calling the Converter obj's underlying member method code with example usage: obj._build_backward(model_proto, tfe_nodes, nodes_output, optimizer) and returns: backward_function, res_dy