code: def fit_cochrane_orcutt(ts, regressors, maxIter=10, sc=None):
      
      
      assert sc != None, "Missing SparkContext"
      
      jvm = sc._jvm
      
      fnord = _nparray2breezematrix(sc, regressors)
      print(fnord)
      
      jmodel = jvm.com.cloudera.sparkts.models.RegressionARIMA.fitCochraneOrcutt(_nparray2breezevector(sc, ts), _nparray2breezematrix(sc, regressors), maxIter)
      return RegressionARIMAModel(jmodel=jmodel, sc=sc)
docs: Fit linear regression model with AR(1) errors , for references on Cochrane Orcutt model:
      See [[https://onlinecourses.science.psu.edu/stat501/node/357]]
      See : Applied Linear Statistical Models - Fifth Edition - Michael H. Kutner , page 492
      The method assumes the time series to have the following model
      
      Y_t = B.X_t + e_t
      e_t = rho*e_t-1+w_t
      e_t has autoregressive structure , where w_t is iid ~ N(0,&sigma 2)
      
      Outline of the method :
      1) OLS Regression for Y (timeseries) over regressors (X)
      2) Apply auto correlation test (Durbin-Watson test) over residuals , to test whether e_t still
         have auto-regressive structure
      3) if test fails stop , else update update coefficients (B's) accordingly and go back to step 1)
      
      Parameters
      ----------
      ts:
          Vector of size N for time series data to create the model for as a Numpy array
      regressors:
          Matrix N X K for the timed values for K regressors over N time points as a Numpy array
      maxIter:
          maximum number of iterations in iterative cochrane-orchutt estimation
      
      Returns instance of class [[RegressionARIMAModel]]