code: def test_optimizer_with_slot_creation_fn_non_partial(self):
      def slot_creation_fn(table, slot_names, _):
          slots = {}
          for slot in slot_names:
              # Note that we don't pass functools.partial here, so on TPU we can't
              # extract the shape. We expect the error below.
              slots[slot] = tf_variables.Variable(
                  name="{}_{}".format(table.name, slot),
                  initial_value=init_ops_v2.Zeros()(
                      shape=table.shape, dtype=dtypes.float32
                  ),
                  trainable=False,
              )
          return slots
  
      optimizer = tpu_embedding_v2_utils.Adagrad(
          learning_rate=0.1, slot_variable_creation_fn=slot_creation_fn
      )
      strategy = self._get_strategy()
      with strategy.scope():
          mid_level_api = tpu_embedding_v2.TPUEmbedding(
              feature_config=self.feature_config, optimizer=optimizer
          )
          with self.assertRaisesRegex(
              ValueError, "Unable to extract initializer function"
          ):
              # We aren't going to actually run anything, so the batch_size here does
              # not matter.
              mid_level_api.build(self.batch_size)
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import init_ops_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import tpu_embedding
  from tensorflow.python.tpu import tpu_embedding_v2
  from tensorflow.python.tpu import tpu_embedding_v2_utils
  from tensorflow.python.tpu.tests import tpu_embedding_base_test
label_desc: Use image node_id 4 for calling the TPUEmbeddingTest obj's underlying member method code with example usage: obj.test_optimizer_with_slot_creation_fn_non_partial() and returns: slots