def METHOD_NAME(child):
    # verify usage
    child.sendline('day')
    child.expect_exact('Usage: day <Year> <Month[1..12]> <Day[1..31]>')
    # loop over a list of valid dates
    for year in (2017, 2018):
        for month in (1, 4, 11):
            for day in (1, 15, 28):
                dt = datetime.datetime(year, month, day)
                count = dt.timetuple().tm_yday
                day_str = dt.strftime('%a').upper()
                child.sendline('day {} {} {}'.format(year, month, day))
                child.expect_exact('What weekday was {}-{:02}-{:02}? '
                                   'The {}(th) day of the year was a {}.'
                                   .format(year, month, day, count, day_str))
    # 2016 is a leap year
    child.sendline('day 2016 2 29')
    child.expect_exact('What weekday was 2016-02-29? '
                       'The 60(th) day of the year was a MON.')
    # 2017 is a leap year
    child.sendline('day 2017 2 29')
    child.expect_exact('The supplied date is invalid, '
                       'but no error should occur.')