anchor.diff:  avp_arity(Name, AvpName, Mod, _, _) ->
       Mod:avp_arity(Name, AvpName).
   
  -%% rc/4
  -
  -%% Length error communicated from diameter_types or a
  -%% @custom_types/@codecs module.
  -rc({'DIAMETER', 5014 = RC, _}, #diameter_avp{name = AvpName} = A, Opts, Mod) ->
  -    {RC, A#diameter_avp{data = Mod:empty_value(AvpName, Opts)}};
  -
  -%% 3588:
  -%%
  -%%   DIAMETER_INVALID_AVP_VALUE         5004
  -%%      The request contained an AVP with an invalid value in its data
  -%%      portion.  A Diameter message indicating this error MUST include
  -%%      the offending AVPs within a Failed-AVP AVP.
  -rc(_, Avp, _, _) ->
  -    {5004, Avp}.
  -
   %% pack/5
   
   pack(Arity, F, Avp, Mod, [Failed | Rec]) ->
  
positive.code: 
  %% set/5
  
  set(_, _, _, _, None)
    when is_atom(None) ->
      None;
  
  set(1, F, Value, _, Map)
    when is_map(Map) ->
  
negative.code: %% A Grouped AVP is represented as a #diameter_avp{} list with AVP
  %% as head and component AVPs as tail.
  
  set('Grouped', Fmt, Avp, V) ->
      {Rec, As} = V,
      [set(Fmt, Avp, Rec) | As];
  
  set(_, _, Avp, V) ->
      Avp#diameter_avp{value = V}.
  