code: def new_bounds_to_old(lb, ub, n):
      """Convert the new bounds representation to the old one.
  
      The new representation is a tuple (lb, ub) and the old one is a list
      containing n tuples, i-th containing lower and upper bound on a i-th
      variable.
      """
      lb = np.asarray(lb)
      ub = np.asarray(ub)
      if lb.ndim == 0:
          lb = np.resize(lb, n)
      if ub.ndim == 0:
          ub = np.resize(ub, n)
  
      lb = [x if x > -np.inf else None for x in lb]
      ub = [x if x < np.inf else None for x in ub]
  
      return list(zip(lb, ub))
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from ._hessian_update_strategy import BFGS
  from ._differentiable_functions import VectorFunction, LinearVectorFunction, IdentityVectorFunction
  from .optimize import OptimizeWarning
  from warnings import warn
  from scipy.sparse import issparse
label_desc: Use image node_id 1 for calling a global function with example usage: new_bounds_to_old(lb, ub, n) and returns: list