code: def test_function():
      class Square:
          def __call__(self, x):
              return np.sum(x**2)
  
      s = Square()
  
      assert s(2) == 4
  
      new_function = function.Function(s)
  
      assert new_function.name == "Square"
  
file_path: opytimizer/tests/opytimizer/core/test_function.py
imports: import numpy
  from opytimizer.core import function
  from opytimizer.utils import constant
label_desc: Use image node_id 9 for calling a global function with example usage: test_function() and returns: np