def _cast_y_axis_extrema(y_axis_extrema):
 try:
  y_axis_extrema = float(y_axis_extrema)
 except ValueError:
  if (y_axis_extrema == 'auto'):
   y_axis_extrema = None
  else:
   raise ValueError(("The min and max y-axis values must be numbers or 'auto'. Couldn't handle the value %r." % y_axis_extrema))
 return y_axis_extrema

def _cast_y_axis_extrema ( y_axis_extrema ) : try : y_axis_extrema = float ( y_axis_extrema ) except ValueError : if ( y_axis_extrema == 'auto' ) : y_axis_extrema = None else : raise ValueError ( ( "The min and max y-axis values must be numbers or 'auto'. Couldn't handle the value %r." % y_axis_extrema ) ) return y_axis_extrema
casts to float; handles auto value as well .