class_docstr: A wrapper class to handle torch.optim.optimizer.
  
  Args:
      optimizer (Union[type, tuple[type, dict]]): Type of optimizer
          for policy. This can be an optimizer type such as
          `torch.optim.Adam` or a tuple of type and dictionary, where
          dictionary contains arguments to initialize the optimizer.
          e.g. `(torch.optim.Adam, {'lr' : 1e-3})`
          Sample strategy to be used when sampling a new task.
      module (torch.nn.Module): Module to be optimized.
      max_optimization_epochs (int): Maximum number of epochs for update.
      minibatch_size (int): Batch size for optimization.
class_docstr_tok: ["A","wrapper","class","to","handle","torch.optim.optimizer",".","Args",":","optimizer","(","Union","[","type",",","tuple","[","type",",","dict","]","]",")",":","Type","of","optimizer","for","policy",".","This","can","be","an","optimizer","type","such","as","`","torch.optim.Adam","`","or","a","tuple","of","type","and","dictionary",",","where","dictionary","contains","arguments","to","initialize","the","optimizer",".","e.g",".","`","(","torch.optim.Adam",",","{","'lr","'",":","1e-3","}",")","`","Sample","strategy","to","be","used","when","sampling","a","new","task",".","module","(","torch.nn.Module",")",":","Module","to","be","optimized",".","max_optimization_epochs","(","int",")",":","Maximum","number","of","epochs","for","update",".","minibatch_size","(","int",")",":","Batch","size","for","optimization","."]
code: def __init__(
      self,
      optimizer,
      module,
      max_optimization_epochs=1,
      minibatch_size=None,
  ):
      self._optimizer = make_optimizer(optimizer, module=module)
      self._max_optimization_epochs = max_optimization_epochs
      self._minibatch_size = minibatch_size
  
imports: from garage import make_optimizer
  from garage.np.optimizers import BatchDataset
label_desc: Use image node_id 1 to create a new OptimizerWrapper object  with example: obj = OptimizerWrapper(optimizer, module, max_optimization_epochs, minibatch_size)