parameters: (x, lb, ub)
return_statement: return min(max(x, lb), ub)
docstring: Return the value of ``x`` clamped to the range ``[lb, ub]``.
docstring_summary: Return the value of ``x`` clamped to the range ``[lb, ub]``.
docstring_tokens: Return the value of x clamped to the range [ lb ub ] .
function: def clamp(x, lb, ub):
      """Return the value of ``x`` clamped to the range ``[lb, ub]``."""
      return min(max(x, lb), ub)
function_tokens: def clamp ( x , lb , ub ) : return min ( max ( x , lb ) , ub )