code: def _finalize_upload(self):
          
          from sevenbridges.models.file import File
          try:
              response = self._api.post(
                  self._URL['upload_complete'].format(upload_id=self._upload_id)
              ).json()
              self._result = File(api=self._api, **response)
              self._status = TransferState.COMPLETED
  
          except SbgError as e:
              self._status = TransferState.FAILED
              raise SbgError(
                  'Failed to complete upload! Reason: {}'.format(e.message)
              )
docs: Finalizes the upload on the API server.