code: def test_multidimensional_fit_GH205():
      # test that you don't need to flatten the output from the objective
      # function. Tests regression for GH205.
      pos = np.linspace(0, 99, 100)
      xv, yv = np.meshgrid(pos, pos)
      f = lambda xv, yv, lambda1, lambda2: (
          np.sin(xv * lambda1) + np.cos(yv * lambda2)
      )
  
      data = f(xv, yv, 0.3, 3)
      assert data.ndim, 2
  
      def fcn2min(params, xv, yv, data):
          """model decaying sine wave, subtract data"""
          model = f(xv, yv, params["lambda1"], params["lambda2"])
          return model - data
  
      # create a set of Parameters
      params = Parameters()
      params.add("lambda1", value=0.4)
      params.add("lambda2", value=3.2)
  
      mini = Minimizer(fcn2min, params, fcn_args=(xv, yv, data))
      mini.minimize()
  
imports: import sys
  import unittest
  import numpy
  from numpy import pi
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
  import pytest
  from scipy.optimize import rosen_der
  from uncertainties import ufloat
  from lmfit import Minimizer, Parameters, minimize
  from lmfit.lineshapes import gaussian
  from lmfit.minimizer import HAS_EMCEE, SCALAR_METHODS, MinimizerResult, coerce_float64
  from lmfit.models import SineModel
label_desc: Use image node_id 10 for calling a global function with example usage: test_multidimensional_fit_GH205() and returns: unknown