<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gill_king(mat, eps=1e-16):
 """ Gill-King algorithm for modified cholesky decomposition. Args: mat (numpy.ndarray):
 Must be a non-singular and symmetric matrix. If sparse, the result will also be sparse. eps (float):
 Error tolerance used in algorithm. Returns: (numpy.ndarray):
 Lower triangular Cholesky factor. Examples: [[2. 0. 0. ] [1. 2.2361 0. ] [0.5 1.118 1.2264]] [[4. 2. 1. ] [2. 6. 3. ] [1. 3. 3.004]] """

    if not scipy.sparse.issparse(mat):
        mat = numpy.asfarray(mat)
    assert numpy.allclose(mat, mat.T)

    size = mat.shape[0]
    mat_diag = mat.diagonal()
    gamma = abs(mat_diag).max()
    off_diag = abs(mat - numpy.diag(mat_diag)).max()

    delta = eps*max(gamma + off_diag, 1)
    beta = numpy.sqrt(max(gamma, off_diag/size, eps))

    lowtri = _gill_king(mat, beta, delta)

    return lowtri