code: def test_example_2_with_n_alpha_interpolation(self):
      x, coxnet = self._fit(
          l1_ratio=0.9, n_alphas=11, alpha_min_ratio=0.001
      )
  
      expected_alphas = np.array(
          [
              0.260499895802314,
              0.130559222137355,
              0.0654346153675493,
              0.0327949938595266,
              0.0164364322492795,
              0.00823773000971849,
              0.00412864511493917,
              0.00206922422378511,
              0.0010370687644734,
              0.000519765625147677,
              0.000260499895802314,
          ]
      )
      assert_array_almost_equal(expected_alphas, coxnet.alphas_)
  
      expected_coef = CoxnetCases.get_example_coef("2-nalpha")
      coef = pd.DataFrame(
          coxnet.coef_, columns=expected_coef.columns, dtype=float
      )
      assert_columns_almost_equal(coef, expected_coef)
  
      expected_offset = np.array(
          [
              0,
              0.000691134372356494,
              0.00398228309120452,
              0.00727343181005256,
              0.0120190989555886,
              0.0148545910591148,
          ]
      )
  
      expected_pred = (
          np.array(
              [
                  [
                      0,
                      -0.00238292430438636,
                      -0.0137302955033516,
                      -0.0250776667023169,
                      -0.11170732289777,
                      -0.178968215018837,
                  ],
                  [
                      0,
                      0.019393427730732,
                      0.111744000040494,
                      0.204094572350256,
                      0.202194208945816,
                      0.1712643455565,
                  ],
                  [
                      0,
                      -0.0142582806836494,
                      -0.0821555291520897,
                      -0.15005277762053,
                      -0.227574637069682,
                      -0.269396998188837,
                  ],
                  [
                      0,
                      -1.68697383231657e-05,
                      -9.72026227669121e-05,
                      -0.000177535507210586,
                      0.0889321572547518,
                      0.161856892574037,
                  ],
              ]
          )
          - expected_offset[np.newaxis]
      )
      pred = np.column_stack(
          [
              coxnet.predict(x.iloc[[122, 10, 22, 200], :], alpha=a)
              for a in [0.75, 0.25, 0.2, 0.15, 0.1, 0.075]
          ]
      )
      assert_array_almost_equal(pred, expected_pred)
  
imports: from dataclasses import dataclass
  from os.path import dirname, join
  from typing import Optional
  import numpy
  from numpy.testing import assert_array_almost_equal
  import pandas
  import pytest
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.pipeline import make_pipeline
  from sksurv.datasets import get_x_y, load_breast_cancer
  from sksurv.linear_model.coxnet import CoxnetSurvivalAnalysis
  from sksurv.preprocessing import OneHotEncoder
  from sksurv.testing import FixtureParameterFactory
  from sksurv.util import Surv
label_desc: Use image node_id 2 for calling the TestCoxnetSurvivalAnalysis obj's underlying member method code with example usage: obj.test_example_2_with_n_alpha_interpolation() without return types