code: def test_update_functions(self):
      UpdateFunction = namedtuple(
          "UpdateFunction",
          "func input_values output_value is_symmetric",
      )
  
      testcases = (
          UpdateFunction(
              func=qn.bfgs,
              input_values=[
                  asfloat(np.eye(3)),
                  asfloat(np.array([0.1, 0.2, 0.3])),
                  asfloat(np.array([0.3, -0.3, -0.5])),
              ],
              output_value=np.array(
                  [
                      [1.41049383, 0.32098765, 0.4537037],
                      [0.32098765, 0.64197531, -0.59259259],
                      [0.4537037, -0.59259259, 0.02777778],
                  ]
              ),
              is_symmetric=True,
          ),
          UpdateFunction(
              func=qn.sr1,
              input_values=[
                  asfloat(np.eye(3)),
                  asfloat(np.array([0.1, 0.2, 0.3])),
                  asfloat(np.array([1, -2, -3])),
              ],
              output_value=[
                  [0.94671053, 0.13026316, 0.19539474],
                  [0.13026316, 0.68157895, -0.47763158],
                  [0.19539474, -0.47763158, 0.28355263],
              ],
              is_symmetric=False,
          ),
          UpdateFunction(
              func=qn.dfp,
              input_values=[
                  asfloat(np.eye(3)),
                  asfloat(np.array([0.1, 0.2, 0.3])),
                  asfloat(np.array([0.3, -0.3, -0.5])),
              ],
              output_value=np.array(
                  [
                      [0.73514212, 0.09819121, 0.18217053],
                      [0.09819121, 0.56847545, -0.6821705],
                      [0.18217053, -0.6821705, -0.08139535],
                  ]
              ),
              is_symmetric=True,
          ),
      )
  
      for case in testcases:
          if not case.input_values:
              continue
  
          result = self.eval(case.func(*case.input_values))
  
          if case.is_symmetric:
              np.testing.assert_array_almost_equal(result, result.T)
  
          np.testing.assert_array_almost_equal(
              result, case.output_value
          )
  
imports: from functools import partial
  from collections import namedtuple
  import numpy
  from sklearn import metrics
  from neupy.utils import asfloat
  from neupy import algorithms, layers, init
  from neupy.algorithms.gd import quasi_newton
  from helpers import simple_classification
  from base import BaseTestCase
label_desc: Use image node_id 2 for calling the QuasiNewtonTestCase obj's underlying member method code with example usage: obj.test_update_functions() without return types