def METHOD_NAME(self, application_guid, application_progress_status_code):
    identity = NOWApplicationIdentity.find_by_guid(application_guid)
    if identity.now_application is None:
        raise NotFound('Notice of Work not found')
    existing_now_progress = next(
        (p for p in identity.now_application.application_progress
         if p.application_progress_status_code == application_progress_status_code), None)
    now_progress = None
    if existing_now_progress:
        #RE Open existing date span - starting at original start time
        existing_now_progress.end_date = None
        now_progress = existing_now_progress
    else:
        #Create new datespan - starting now
        new_now_progress = NOWApplicationProgress.create(identity.now_application,
                                                         application_progress_status_code)
        now_progress = new_now_progress
    if identity.now_application.now_application_status_code != "REF" and application_progress_status_code in [
            "REF", "CON", "PUB"
    ]:
        identity.now_application.previous_application_status_code = identity.now_application.now_application_status_code
        identity.now_application.now_application_status_code = "REF"
    identity.save()
    try:
        now_progress.save()
    except Exception as e:
        raise InternalServerError(f'Error when saving: {e}')
    return now_progress, 201