class_docstr: Builds `_EnsembleSpec` instances.
  
  Args:
    head: A `tf.contrib.estimator.Head` instance.
    metric_fn: A function which should obey the following signature:
      - Args: can only have following three arguments in any order:
        * predictions: Predictions `Tensor` or dict of `Tensor` created by given
          `Head`.
        * features: Input `dict` of `Tensor` objects created by `input_fn` which
          is given to `estimator.evaluate` as an argument.
        * labels:  Labels `Tensor` or dict of `Tensor` (for multi-head) created
          by `input_fn` which is given to `estimator.evaluate` as an argument.
      - Returns: Dict of metric results keyed by name. Final metrics are a union
        of this and `Head's` existing metrics. If there is a name conflict
        between this and `estimator`s existing metrics, this will override the
        existing one. The values of the dict are the results of calling a metric
        function, namely a `(metric_tensor, update_op)` tuple.
    use_tpu: Whether AdaNet is running on TPU.
    export_subnetwork_logits: Include subnetwork logits in exports.
    export_subnetwork_last_layer: Include subnetwork last layer in exports.
  
  Returns:
    An `_EnsembleBuilder` instance.
code: def __init__(
      self,
      head,
      metric_fn=None,
      use_tpu=False,
      export_subnetwork_logits=False,
      export_subnetwork_last_layer=False,
  ):
      _verify_metric_fn_args(metric_fn)
  
      self._head = head
      self._metric_fn = metric_fn
      self._use_tpu = use_tpu
      self._export_subnetwork_logits = export_subnetwork_logits
      self._export_subnetwork_last_layer = export_subnetwork_last_layer
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import copy
  import functools
  import inspect
  import os
  from absl import logging
  from adanet import ensemble
  from adanet import subnetwork
  from adanet import tf_compat
  from adanet.core.architecture import _Architecture
  from adanet.core.eval_metrics import _EnsembleMetrics
  from adanet.core.eval_metrics import _SubnetworkMetrics
  from adanet.core.summary import monkey_patched_summaries
  import tensorflow.compat.v1
  import tensorflow.compat.v2
label_desc: Use image node_id 1 to create a new _EnsembleBuilder object from inherited base classes: object with example: obj = _EnsembleBuilder(head, metric_fn, use_tpu, export_subnetwork_logits, export_subnetwork_last_layer)