code: def test_failure_maxiter(self, locally_biased):
      # test that if optimization runs for the maximal number of
      # iterations, success = False is returned
  
      maxiter = 10
      result = direct(
          self.styblinski_tang,
          self.bounds_stylinski_tang,
          maxiter=maxiter,
          locally_biased=locally_biased,
      )
      assert result.success is False
      assert result.status == 2
      assert result.nit >= maxiter
      message = f"Number of iterations is larger than maxiter={maxiter}"
      assert result.message == message
  
imports: from numpy.testing import assert_allclose, assert_array_less
  import pytest
  import numpy
  from scipy.optimize import direct, Bounds
label_desc: Use image node_id 17 for calling the TestDIRECT obj's underlying member method code with example usage: obj.test_failure_maxiter(locally_biased) without return types