code: def test_ktr_regressor_sizes(
      iclaims_training_data, regression_segments, regressor_col
  ):
      # this iclaims dataset is raw; the one under load_data is log-transformed
      df = iclaims_training_data
      df["claims"] = np.log(df["claims"])
  
      ktr = KTR(
          date_col="week",
          response_col="claims",
          regressor_col=regressor_col,
          seasonality=[52],
          seasonality_fs_order=[3],
          level_knot_scale=0.1,
          level_segments=10,
          regression_segments=regression_segments,
          regression_rho=0.15,
          # pyro optimization parameters
          seed=8888,
          num_steps=100,
          num_sample=100,
      )
      ktr.fit(df)
      ktr.predict(df)
      coef_df = ktr.get_regression_coefs()
      knot_df = ktr.get_regression_coef_knots()
  
      expected_columns_coef = ["week"] + regressor_col
      expected_columns_knot = ["week", "step"] + regressor_col
  
      assert coef_df.columns.tolist() == expected_columns_coef
      assert knot_df.columns.tolist() == expected_columns_knot
      assert coef_df.shape[0] == df.shape[0]
      assert knot_df.shape[0] == regression_segments + 1
  
file_path: orbit/tests/orbit/models/test_ktr.py
imports: import pytest
  import numpy
  import pandas
  from orbit.models import KTR
  from orbit.diagnostics.metrics import smape
label_desc: Use image node_id 8 for calling a global function with example usage: test_ktr_regressor_sizes(iclaims_training_data, regression_segments, regressor_col) without return types