def METHOD_NAME(text, percent):
    if self.is_aborted():
        raise TaskAbort
    if text is not None:
        s.text = text
    if percent is not None:
        s.percent = percent
    print('%d: %s' % (s.percent, s.text))
    self.update_state(
        state='PROGRESS',
        meta={'text': s.text, 'percent': s.percent}
    )