anchor.diff:  
   %% @private
   -spec enqueue_work_or_stop(atom(), term(), gen_statem:from(), statedata(), timeout()) ->
  -    keep_state_and_data |
  +    {keep_state_and_data, [{reply, gen_statem:from(), {error, {unexpected, atom()}}}]} |
       {keep_state, statedata(), [{timeout, timeout(), get_work}]}.
   enqueue_work_or_stop(_StateName, Event, From, StateData, Timeout) ->
       case create_work(Event, From) of
  
positive.code:     {next_state, at_rest, StateData, [{reply, From, Result}]};
  receive_data(cast, {gun_error, _Pid, StreamRef, _Reason},
               #{stream := StreamRef} = StateData) ->
      {next_state, at_rest, StateData, 0};
  receive_data(info, Event, StateData) ->
      handle_info(Event, receive_data, StateData).
  
  %% @private
  %% @doc Chunked data response
  -spec receive_chunk({call, gen_statem:from()} | cast | info, term(), statedata()) ->
      {stop, {error, any()}, atom(), statedata()} |
      {next_state, atom(), statedata()} |
      {next_state, atom(), statedata(), timeout()}.
  receive_chunk({call, From}, Event, StateData) ->
      enqueue_work_or_stop(receive_chunk, Event, From, StateData);
  receive_chunk(cast, {'DOWN', _, _, _, _Reason}, _StateData) ->
  
negative.code: 
  %% @private
  -spec enqueue_work_or_stop(atom(), term(), gen_statem:from(), statedata()) ->
      {keep_state, statedata(), [{reply, gen_statem:from(), list()}]} |
      {keep_state, statedata(), [{timeout, timeout(), get_work}]} |
      {keep_state_and_data, [{reply, gen_statem:from(), {error, {unexpected, atom()}}}]}.
  enqueue_work_or_stop(_StateName, get_events, From, #{responses := Responses} = StateData) ->
      Reply = queue:to_list(Responses),
      {keep_state, StateData#{responses := queue:new()}, [{reply, From, Reply}]};
  