code: def _wrap_hard_box_constraints(f, box, default):
      """Places hard box constraints on the domain of ``f``
      and defaults function values if constraints are violated.
  
      :param f: the function to be wrapped with constraints
      :type f: callable
      :param box: the box, as a dict: ``{'param_name': [lb, ub], ...}``
      :type box: dict
      :param default: function value to default to when constraints
          are violated
      :type default: number
  
      """
      return wrap_constraints(f, default, range_oo=box)
  
imports: import timeit
  import sys
  import operator
  from .None import functions
  from .None import solvers
  from .None import search_spaces
  from .solvers import solver_registry
  from .util import DocumentedNamedTuple
  from .constraints import wrap_constraints
label_desc: Use image node_id 10 for calling a global function with example usage: _wrap_hard_box_constraints(f, box, default) and returns: wrap_constraints