code: def test_add_trend_ctt():
      n = 10
      x = np.zeros((n, 1))
      y = add_trend(x, trend="ctt")
      assert np.all(y[:, 1] == 1.0)
      assert y[0, 2] == 1.0
      assert_array_almost_equal(np.diff(y[:, 2]), np.ones(n - 1))
      assert y[0, 3] == 1.0
      assert_array_almost_equal(
          np.diff(y[:, 3]), np.arange(3.0, 2.0 * n, 2.0)
      )
  
imports: import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_equal
  import pandas
  from pandas.testing import assert_frame_equal
  import pytest
  from arch.utility.timeseries import ColumnNameConflict, add_trend
label_desc: Use image node_id 9 for calling a global function with example usage: test_add_trend_ctt() without return types