def append_fragment(frag_content, frag_index, ctx):
    if frag_content:
        self._append_fragment(ctx, pack_func(frag_content, frag_index))
    elif (not is_fatal((frag_index - 1))):
        self.report_skip_fragment(frag_index, 'fragment not found')
    else:
        ctx['dest_stream'].close()
        self.report_error(f'fragment {frag_index} not found, unable to continue')
        return False
    return True
def append_fragment(frag_content, frag_index, ctx):
    if frag_content:
        self._append_fragment(ctx, pack_func(frag_content, frag_index))
    elif (not is_fatal((frag_index - 1))):
        self.report_skip_fragment(frag_index, 'fragment not found')
    else:
        ctx['dest_stream'].close()
        self.report_error(f'fragment {frag_index} not found, unable to continue')
        return False
    return True