anchor.diff:           {ok, V} ->
                V
        end.
  +
  +
  +-spec convert_error_dict_to_string(dict()) -> list().
  +convert_error_dict_to_string(ErrorKeyDict) ->
  +    StrHead = case dict:size(ErrorKeyDict) > 0 of
  +                  true ->
  +                      "Error with their keys:";
  +                  _ ->
  +                      "No error keys."
  +              end,
  +    ErrorStr =
  +        dict:fold(fun(Status, KeyList, ErrorStrIn) ->
  +                          L = length(KeyList),
  +                          Msg1 = ?format_msg("~p keys with ~p errors", [L, Status]),
  +                          Msg2 = case L > 10 of
  +                                     true ->
  +                                         ?format_msg("(dump first 10 keys: ~p); ",
  +                                                     [lists:sublist(KeyList, 10)]);
  +                                     _ ->
  +                                         ?format_msg("(~p); ", [KeyList])
  +                                 end,
  +                          ErrorStrIn ++ Msg1 ++ Msg2
  +                  end,
  +                  [], ErrorKeyDict),
  +    StrHead ++ ErrorStr.
  +
  
positive.code:                         Header#mc_header{opcode = Opcode}, mc_client_binary:ext(Opcode, Entry)),
      ok.
  
  -spec categorise_statuses_to_dict(list(), list()) -> {dict(), list()}.
  categorise_statuses_to_dict(Statuses, DocsList) ->
      {ErrorDict, ErrorKeys, _}
          = lists:foldl(fun(Status, {DictAcc, ErrorKeyAcc, CountAcc}) ->
  
negative.code:                                           {dict:update_counter(success, 1, DictAcc), ErrorKeyAcc};
                                        %% use status as key since # of memcached status is limited
                                        S ->
                                            NewDict = dict:update_counter(S, 1, DictAcc),
                                            CurrKeyList = case dict:find(Status, ErrorKeyAcc) of
                                                              {ok, V} ->
                                                                  V;
                                                              _ ->
                                                                  []
                                                          end,
                                            NewKeyList = [Key | CurrKeyList],
                                            NewErrorKey = dict:store(Status, NewKeyList, ErrorKeyAcc),
                                            {NewDict, NewErrorKey}
                                    end,
                                {DictAcc2, ErrorKeyAcc2, CountAcc2}
                        end,
                        {dict:new(), dict:new(), 0},
                        lists:reverse(Statuses)),
      {ErrorDict, ErrorKeys}.
  
  -spec lookup_error_dict(term(), dict()) -> integer().
  lookup_error_dict(Key, ErrorDict)->
  