def METHOD_NAME(date):
  import datetime
  parsed = datetime.datetime.strptime(date, '%Y-%m-%d')
  if (parsed > datetime.datetime(2012, 12, 31) or
      parsed < datetime.datetime(2002, 1, 1)):
    raise ValueError("There's only data from 2002-01-01 to 2012-12-31")
  return date