code: def _l2_loss_flops(graph, node):
      """Compute flops for L2Loss operation."""
      in_shape = graph_util.tensor_shape_from_node_def_name(
          graph, node.input[0]
      )
      in_shape.assert_is_fully_defined()
      # Tensorflow uses inefficient implementation, with (3*N-1) flops:
      # Optimal implementation is 2*N flops
      return ops.OpStats("flops", in_shape.num_elements() * 3 - 1)
  
imports: import numpy
  from tensorflow.python.framework import graph_util
  from tensorflow.python.framework import ops
label_desc: Use image node_id 11 for calling a global function with example usage: _l2_loss_flops(graph, node) and returns: ops