code: def _shgo_optimizer(fun, **kwargs):
      r"""Wrapper for ``scipy.optimize.shgo`` (Simplicial Homology global optimizer).
      Signature is as expected by ``RotosolveOptimizer._min_numeric`` below, providing
      a scalar minimal position and the function value at that position.
      """
      opt_res = shgo(fun, **kwargs)
      return opt_res.x[0], opt_res.fun
  
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 2 for calling a global function with example usage: _shgo_optimizer(fun) and returns: opt_res,  opt_res