code: def _create_strategy_and_mid_level(self, optimizer_name):
      strategy = self._get_strategy()
  
      with strategy.scope():
          if optimizer_name == "sgd":
              embedding_optimizer = tpu_embedding_v2_utils.SGD(
                  learning_rate=0.1
              )
          elif optimizer_name == "adagrad":
              embedding_optimizer = tpu_embedding_v2_utils.Adagrad(
                  learning_rate=0.1
              )
          elif optimizer_name == "adam":
              embedding_optimizer = tpu_embedding_v2_utils.Adam(
                  learning_rate=0.1
              )
          elif optimizer_name == "ftrl":
              embedding_optimizer = tpu_embedding_v2_utils.FTRL(
                  learning_rate=0.1
              )
          else:
              raise ValueError(
                  "optimizer is not recognized: ", optimizer_name
              )
  
          mid_level_api = self._create_mid_level(
              optimizer=embedding_optimizer
          )
  
      return strategy, mid_level_api
  
file_path: tensorflow/tensorflow/python/tpu/tests/tpu_embedding_v1_correctness_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.eager import def_function
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import tpu_embedding_v1
  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 3 for calling the TPUEmbeddingV0CorrectnessTest obj's underlying member method code with example usage: obj._create_strategy_and_mid_level(optimizer_name) and returns: strategy,  mid_level_api