code: def test_nonlin1():
      # Fit an exponential curve, with the exponent stratified by a factor
      # with a common intercept and multiplicative factor in front of the
      # exponential
      x = F.Term("x")
      fac = F.Factor("f", "ab")
      f = F.Formula([sympy.exp(fac.stratify(x).mean)]) + F.I
      params = F.getparams(f.mean)
      assert {str(p) for p in params} == {"_x0", "_x1", "_b0", "_b1"}
      test1 = {
          "1",
          "exp(_x0*f_a + _x1*f_b)",
          "_b0*f_a*exp(_x0*f_a + _x1*f_b)",
          "_b0*f_b*exp(_x0*f_a + _x1*f_b)",
      }
      test2 = {
          "1",
          "exp(_x0*f_a + _x1*f_b)",
          "_b1*f_a*exp(_x0*f_a + _x1*f_b)",
          "_b1*f_b*exp(_x0*f_a + _x1*f_b)",
      }
      assert test1 or test2
      n = F.make_recarray(
          [(2, 3, "a"), (4, 5, "b"), (5, 6, "a")],
          "xyf",
          ["d", "d", "S1"],
      )
      p = F.make_recarray([1, 2, 3, 4], ["_x0", "_x1", "_b0", "_b1"])
      A = f.design(n, p)
      print(A, A.dtype)
  
imports: from warnings import catch_warnings, simplefilter
  import numpy
  import pytest
  import sympy
  from numpy.core.records import fromrecords
  from numpy.testing import assert_almost_equal, assert_array_equal
  from sympy.utilities.lambdify import implemented_function
  from nipy.utils import VisibleDeprecationWarning
  from ..None import formulae
  from ..formulae import Term, terms
label_desc: Use image node_id 22 for calling a global function with example usage: test_nonlin1() without return types