def METHOD_NAME(problem_id, today):
    global total_inserted
    global total_updated
    global not_updated
    ptable = db.problem
    row = ptable(problem_id)
    link = row.link
    site = utilities.urltosite(link)
    try:
        Site = getattr(sites, site.lower())
        P = Site.Profile
        if P.is_website_down():
            editorial_link = None
        else:
            editorial_func = P.get_editorial_link
            editorial_link = editorial_func(link)
    except AttributeError:
        editorial_link = None
    if row:
        if editorial_link:
            row.update_record(editorial_link=editorial_link,
                              editorial_added_on=today)
            print "Updated", link, "->", editorial_link
            total_updated += 1
        else:
            not_updated += 1
            print "No-change", link
    else:
        print "****************Should not be here****************"
        total_inserted += 1
        print "Inserted", link, editorial_link
        # Intentional raising error to fix the issue
        1 / 0
        # Insert editorial_link in problem table
        ptable.insert(link=link,
                      editorial_link=editorial_link,
                      editorial_added_on=today,
                      tags_added_on=today)