code: def _build_subnetwork(self, multi_head=False):
      last_layer = tf.Variable(
          tf_compat.random_normal(shape=(2, 3)), trainable=False
      ).read_value()
  
      def new_logits():
          return tf_compat.v1.layers.dense(
              last_layer,
              units=1,
              kernel_initializer=tf_compat.v1.glorot_uniform_initializer(),
          )
  
      if multi_head:
          logits = {k: new_logits() for k in multi_head}
          last_layer = {k: last_layer for k in multi_head}
      else:
          logits = new_logits()
  
      return subnetwork.Subnetwork(
          last_layer=logits, logits=logits, complexity=2
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  from absl.testing import parameterized
  from adanet import ensemble
  from adanet import subnetwork
  from adanet import tf_compat
  from adanet.core.summary import Summary
  import mock
  import tensorflow.compat.v2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 3 for calling the ComplexityRegularizedEnsemblerTest obj's underlying member method code with example usage: obj._build_subnetwork(multi_head) and returns: subnetwork, tf_compat