code: def test_pickle_round_trip():
      """Test that pickling works as one would normally expect."""
      # pylint: disable=protected-access
      p1 = torch.tensor([0.1])
      p2 = torch.tensor([0.1])
      params = [p1, p2]
      optimizer = ConjugateGradientOptimizer(params, 0.01)
      optimizer_pickled = pickle.dumps(optimizer)
      optimizer2 = pickle.loads(optimizer_pickled)
      assert (
          optimizer._max_constraint_value
          == optimizer2._max_constraint_value
      )
      assert optimizer._cg_iters == optimizer2._cg_iters
      assert optimizer._max_backtracks == optimizer2._max_backtracks
      assert optimizer._backtrack_ratio == optimizer2._backtrack_ratio
      assert optimizer._hvp_reg_coeff == optimizer2._hvp_reg_coeff
      assert optimizer._accept_violation == optimizer2._accept_violation
  
imports: import pickle
  import numpy
  import pytest
  import torch
  from garage.torch.optimizers.conjugate_gradient_optimizer import ConjugateGradientOptimizer
  from garage.torch.optimizers.conjugate_gradient_optimizer import _build_hessian_vector_product
  from garage.torch.optimizers.conjugate_gradient_optimizer import _conjugate_gradient
label_desc: Use image node_id 6 for calling a global function with example usage: test_pickle_round_trip() without return types