code: def test_opytimizer_function_setter():
      space = search.SearchSpace(1, 1, 0, 1)
      func = function.Function(callable)
      optimizer = pso.PSO()
  
      new_opytimizer = opytimizer.Opytimizer(space, optimizer, func)
  
      try:
          func.built = False
          new_opytimizer.function = func
      except:
          func.built = True
          new_opytimizer.function = func
  
      assert type(new_opytimizer.function).__name__ == "Function"
  
imports: import opytimizer
  from opytimizer.core import function
  from opytimizer.optimizers.swarm import pso
  from opytimizer.spaces import search
  from opytimizer.utils import callback, history
label_desc: Use image node_id 6 for calling a global function with example usage: test_opytimizer_function_setter() without return types