code: def test_optimizer(self, loss_key):
      estimator_with_default_optimizer = self._create_default_estimator(
          loss_key
      )
      self.assertIsInstance(
          estimator_with_default_optimizer._optimizer,
          tf.compat.v1.train.AdagradOptimizer,
      )
  
      estimator_with_adam_optimizer = tfr_estimator.EstimatorBuilder(
          _context_feature_columns(),
          _example_feature_columns(),
          _scoring_function,
          optimizer=tf.compat.v1.train.AdamOptimizer(
              learning_rate=0.01
          ),
          hparams=_get_hparams(),
      )
      self.assertIsInstance(
          estimator_with_adam_optimizer._optimizer,
          tf.compat.v1.train.AdamOptimizer,
      )
  
imports: import os
  from absl.testing import parameterized
  import six
  import tensorflow
  from tensorflow import estimator
  from google.protobuf import text_format
  from tensorflow_ranking.python import data
  from tensorflow_ranking.python import estimator
  from tensorflow_ranking.python import feature
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 10 for calling the EstimatorBuilderTest obj's underlying member method code with example usage: obj.test_optimizer(loss_key) without return types