<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def copyPage(self, pno, to=-1):
 """Copy a page to before some other page of the document. Specify 'to = -1' to copy after last page. """

        pl = list(range(len(self)))
        if pno < 0 or pno > pl[-1]:
            raise ValueError("'from' page number out of range")
        if to < -1 or to > pl[-1]:
            raise ValueError("'to' page number out of range")
        if to == -1:
            pl.append(pno)
        else:
            pl.insert(to, pno)
        return self.select(pl)