'Inserts a blank page to this PDF file and returns it. If no page size
is specified, use the size of the last page.
:param float width: The width of the new page expressed in default user
space units.
:param float height: The height of the new page expressed in default
user space units.
:param int index: Position to add the page.
:return: the newly appended page
:rtype: :class:`PageObject<PyPDF2.pdf.PageObject>`
:raises PageSizeNotDefinedError: if width and height are not defined
and previous page does not exist.'

def insertBlankPage(self, width=None, height=None, index=0):

    if ((width is None) or ((height is None) and ((self.getNumPages() - 1) >= index))):
        oldpage = self.getPage(index)
        width = oldpage.mediaBox.getWidth()
        height = oldpage.mediaBox.getHeight()
    page = PageObject.createBlankPage(self, width, height)
    self.insertPage(page, index)
    return page
