<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I'm searching for examples of using scipy.optimize.line_search. I do not really understand how this function works with multivariable functions. I wrote a simple example
<ASSISTANT_TASK:>
Python Code:
import scipy
import scipy.optimize
import numpy as np
def test_func(x):
    return (x[0])**2+(x[1])**2
def test_grad(x):
    return [2*x[0],2*x[1]]
starting_point = [1.8, 1.7]
direction = [-1, -1]
result = scipy.optimize.line_search(test_func, test_grad, np.array(starting_point), np.array(direction))[0]
<END_TASK>