code: def get_filesize(self, pdf):
          
          try:
              filesize = float(pdf.get_size())
              return filesize / 1024
          except (POSKeyError, TypeError):
              return 0
docs: Compute the filesize of the PDF