<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def namer(cls, imageUrl, pageUrl):
 """Remove random junk from image names."""

        imgname = imageUrl.split('/')[-1]
        imgbase = imgname.rsplit('-', 1)[0]
        imgext = imgname.rsplit('.', 1)[1]
        return '%s.%s' % (imgbase, imgext)