class_docstr: Test class for tf & pytorch make_optimizer functions.
docstr: Test make_optimizer function with type as first argument.
docstr_tok: ["Test","make_optimizer","function","with","type","as","first","argument","."]
code: def test_tf_make_optimizer_with_type(self):
      """Test make_optimizer function with type as first argument."""
      optimizer_type = tf.compat.v1.train.AdamOptimizer
      lr = 0.123
      optimizer = make_optimizer(
          optimizer_type, learning_rate=lr, name="testOptimizer"
      )
      assert isinstance(optimizer, optimizer_type)
      self.sess.run(tf.compat.v1.global_variables_initializer())
      assert optimizer._name == "testOptimizer"
      assert np.allclose(optimizer._lr, lr)
  
imports: import csv
  import math
  import tempfile
  import akro
  import dowel
  from dowel import logger, tabular
  import numpy
  import pytest
  import tensorflow
  import torch
  from garage import _Default, EnvSpec, EpisodeBatch, log_multitask_performance, log_performance, make_optimizer, rollout, StepType
  from garage.envs import GymEnv
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyBoxEnv
  from tests.fixtures.policies import DummyPolicy
label_desc: Use image node_id 1 for calling the TestOptimizerInterface obj's underlying member method code with example usage: obj.test_tf_make_optimizer_with_type() without return types