parameters: (self, src, snk, new_layer, new_keras_layer)
docstring: Insert the new_layer before layer, whose position is layer_idx. The new layer's
          parameter is stored in a Keras layer called new_keras_layer
docstring_summary: Insert the new_layer before layer, whose position is layer_idx. The new layer's
          parameter is stored in a Keras layer called new_keras_layer
docstring_tokens: Insert the new_layer before layer whose position is layer_idx . The new layer s parameter is stored in a Keras layer called new_keras_layer
function: def _insert_layer_between(self, src, snk, new_layer, new_keras_layer):
          """
          Insert the new_layer before layer, whose position is layer_idx. The new layer's
          parameter is stored in a Keras layer called new_keras_layer
          """
          if snk is None:
              insert_pos = self.layer_list.index(src) + 1
          else:
              insert_pos = self.layer_list.index(snk)  # insert position
          self.layer_list.insert(insert_pos, new_layer)
          self.keras_layer_map[new_layer] = new_keras_layer
          if src is None:  # snk is an input layer
              self._add_edge(new_layer, snk)
          elif snk is None:  # src is an output layer
              self._add_edge(src, new_layer)
          else:
              self._add_edge(src, new_layer)
              self._add_edge(new_layer, snk)
              self._remove_edge(src, snk)
function_tokens: def _insert_layer_between ( self , src , snk , new_layer , new_keras_layer ) : if snk is None : insert_pos = self . layer_list . index ( src ) + 1 else : insert_pos = self . layer_list . index ( snk ) # insert position self . layer_list . insert ( insert_pos , new_layer ) self . keras_layer_map [ new_layer ] = new_keras_layer if src is None : # snk is an input layer self . _add_edge ( new_layer , snk ) elif snk is None : # src is an output layer self . _add_edge ( src , new_layer ) else : self . _add_edge ( src , new_layer ) self . _add_edge ( new_layer , snk ) self . _remove_edge ( src , snk )