code: def custom_optimizer(fun, **kwargs):
      r"""Wrapper for ``scipy.optimize.shgo`` that does not return y_min."""
      opt_res = shgo(fun, **kwargs)
      return opt_res.x[0], None
  
imports: import functools
  import pytest
  from scipy.optimize import shgo
  import pennylane
  from pennylane import numpy
  from pennylane.utils import _flatten, unflatten
  from pennylane.optimize import RotosolveOptimizer
label_desc: Use image node_id 7 for calling a global function with example usage: custom_optimizer(fun) and returns: opt_res,  None