code: def _brute_optimizer(fun, num_steps, bounds=None, **kwargs):
      r"""Brute force optimizer, wrapper of scipy.optimize.brute that repeats it
      ``num_steps`` times. Signature is as expected by ``RotosolveOptimizer._min_numeric``
      below, returning a scalar minimal position and the function value at that position.
      """
      Ns = kwargs.pop("Ns")
      width = bounds[0][1] - bounds[0][0]
      center = (bounds[0][1] + bounds[0][0]) / 2
      for _ in range(num_steps):
          range_ = (center - width / 2, center + width / 2)
          center, y_min, *_ = brute(
              fun, ranges=(range_,), full_output=True, Ns=Ns, **kwargs
          )
          # We only ever use this function for 1D optimization
          center = center[0]
          width /= Ns
  
      return center, y_min
  
file_path: pennylane/pennylane/optimize/rotosolve.py
imports: from inspect import signature
  import numpy
  from scipy.optimize import brute, shgo
  import pennylane
label_desc: Use image node_id 1 for calling a global function with example usage: _brute_optimizer(fun, num_steps, bounds) and returns: center,  y_min