docstr: Test serialization (cereal/pickle) of Cox Regression.
code: def test_coxreg_serialize_and_compare(self):
      """Test serialization (cereal/pickle) of Cox Regression."""
      np.random.seed(123)
      n_samples, n_features = 100, 5
      w0 = np.random.randn(n_features)
      features, times, censoring = SimuCoxReg(
          w0, n_samples=n_samples, verbose=False, seed=1234
      ).simulate()
  
      model = ModelCoxRegPartialLik()
      model.fit(features, times, censoring)
      pickled = pickle.loads(pickle.dumps(model))
      self.assertTrue(model._model.compare(pickled._model))
  
file_path: tick/tick/survival/tests/model_coxreg_partial_lik_test.py
imports: import unittest, pickle
  import numpy
  from scipy.sparse import csr_matrix
  from tick.survival import SimuCoxReg, ModelCoxRegPartialLik
  from tick.base_model.tests.generalized_linear_model import TestGLM
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_coxreg_serialize_and_compare() without return types