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_torch_make_optimizer_with_type(self):
      """Test make_optimizer function with type as first argument."""
      optimizer_type = torch.optim.Adam
      module = torch.nn.Linear(2, 1)
      lr = 0.123
      optimizer = make_optimizer(optimizer_type, module=module, lr=lr)
      assert isinstance(optimizer, optimizer_type)
      assert optimizer.defaults["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 4 for calling the TestOptimizerInterface obj's underlying member method code with example usage: obj.test_torch_make_optimizer_with_type() without return types