code: def _internal2external_lambda(bound):
      
      lower, upper = bound
  
      if lower is None and upper is None:  # no constraints
          return lambda x: x
      elif upper is None:     # only lower bound
          return lambda x: lower - 1. + sqrt(x * x + 1.)
      elif lower is None:     # only upper bound
          return lambda x: upper + 1. - sqrt(x * x + 1.)
      else:
          return lambda x: lower + ((upper - lower) / 2.) * (sin(x) + 1.)
docs: Make a lambda function which converts a single internal (uncontrained)
      parameter to a external (constrained) parameter.