import collections


def get_month_most_posts(dates):
    """Receives a list of datetimes and returns the month (format YYYY-MM)
       that occurs most"""
    c = collections.Counter()
    for d in dates:
        c[str(d.year) + '-' + str(d.month).zfill(2)] += 1
    return c.most_common(1)[0][0]