code: def old_bound_to_new(bounds):
      """Convert the old bounds representation to the new one.
  
      The new representation is a tuple (lb, ub) and the old one is a list
      containing n tuples, ith containing lower and upper bound on a ith
      variable.
      If any of the entries in lb/ub are None they are replaced by
      -np.inf/np.inf.
      """
      lb, ub = zip(*bounds)
  
      # Convert occurrences of None to -inf or inf, and replace occurrences of
      # any numpy array x with x.item(). Then wrap the results in numpy arrays.
      lb = np.array(
          [
              float(_arr_to_scalar(x)) if x is not None else -np.inf
              for x in lb
          ]
      )
      ub = np.array(
          [
              float(_arr_to_scalar(x)) if x is not None else np.inf
              for x in ub
          ]
      )
  
      return lb, ub
  
imports: import numpy
  from ._hessian_update_strategy import BFGS
  from ._differentiable_functions import VectorFunction, LinearVectorFunction, IdentityVectorFunction
  from ._optimize import OptimizeWarning
  from warnings import warn, catch_warnings, simplefilter, filterwarnings
  from scipy.sparse import issparse
label_desc: Use image node_id 3 for calling a global function with example usage: old_bound_to_new(bounds) and returns: lb,  ub