code: def _make_arima(
      phi, theta, delta, kappa=1e6, tol=np.finfo(float).eps
  ):
      # check nas phi
      # check nas theta
      p = len(phi)
      q = len(theta)
      r = max(p, q + 1)
      d = len(delta)
  
      rd = r + d
      Z = np.concatenate((np.array([1.0]), np.zeros(r - 1), delta))
      T = np.zeros((rd, rd))
  
      if p > 0:
          T[:p, 0] = phi
      if r > 1:
          for i in range(1, r):
              T[i - 1, i] = 1
  
      if d > 0:
          T[r] = Z
          if d > 1:
              for ind in range(1, d):
                  T[r + ind, r + ind - 1] = 1
  
      if q < r - 1:
          theta = np.concatenate((theta, np.zeros(r - 1 - q)))
  
      R = np.concatenate((np.array([1.0]), theta, np.zeros(d)))
      V = R * R.reshape(-1, 1)
      h = 0.0
      a = np.zeros(rd)
      Pn = np.zeros((rd, rd))
      P = np.zeros((rd, rd))
  
      if r > 1:
          Pn[:r, :r] = getQ0(phi, theta)
      else:
          Pn[0, 0] = 1 / (1 - phi[0] ** 2) if p > 0 else 1.0
  
      if d > 0:
          for i in range(d):
              Pn[r + i, r + i] = kappa
  
      return phi, theta, delta, Z, a, P, T, V, h, Pn
  
imports: import math
  import warnings
  from collections import namedtuple
  from functools import partial
  from typing import Optional, Dict, Union, Tuple
  import numpy
  import pandas
  import statsmodels.api
  from numba import njit
  from scipy.optimize import minimize
  from scipy.stats import norm
  from .mstl import mstl
  from .utils import CACHE, NOGIL
label_desc: Use image node_id 11 for calling a global function with example usage: _make_arima(phi, theta, delta, kappa, tol) and returns: phi,  theta,  delta,  Z,  a,  P,  T,  V,  h,  Pn