def coerce(string):
  """When  appropriate, coerce `string` into some type. 
  Supports floats, ints, booleans and strings."""
  if string == "True": return True
  if string == "False": return False
  try: return int(string)
  except Exception:
    try: return float(string)
    except Exception: return string