parameters: (wire_type, encode_value, compute_value_size, modify_value)
return_statement: return SpecificEncoder
docstring: Like SimpleEncoder but additionally invokes modify_value on every value
    before passing it to encode_value.  Usually modify_value is ZigZagEncode.
docstring_summary: Like SimpleEncoder but additionally invokes modify_value on every value
    before passing it to encode_value.  Usually modify_value is ZigZagEncode.
docstring_tokens: Like SimpleEncoder but additionally invokes modify_value on every value before passing it to encode_value . Usually modify_value is ZigZagEncode .
function: def _ModifiedEncoder(wire_type, encode_value, compute_value_size, modify_value):
    """Like SimpleEncoder but additionally invokes modify_value on every value
    before passing it to encode_value.  Usually modify_value is ZigZagEncode."""
  
    def SpecificEncoder(field_number, is_repeated, is_packed):
      if is_packed:
        tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED)
        local_EncodeVarint = _EncodeVarint
        def EncodePackedField(write, value):
          write(tag_bytes)
          size = 0
          for element in value:
            size += compute_value_size(modify_value(element))
          local_EncodeVarint(write, size)
          for element in value:
            encode_value(write, modify_value(element))
        return EncodePackedField
      elif is_repeated:
        tag_bytes = TagBytes(field_number, wire_type)
        def EncodeRepeatedField(write, value):
          for element in value:
            write(tag_bytes)
            encode_value(write, modify_value(element))
        return EncodeRepeatedField
      else:
        tag_bytes = TagBytes(field_number, wire_type)
        def EncodeField(write, value):
          write(tag_bytes)
          return encode_value(write, modify_value(value))
        return EncodeField
  
    return SpecificEncoder
function_tokens: def _ModifiedEncoder ( wire_type , encode_value , compute_value_size , modify_value ) : def SpecificEncoder ( field_number , is_repeated , is_packed ) : if is_packed : tag_bytes = TagBytes ( field_number , wire_format . WIRETYPE_LENGTH_DELIMITED ) local_EncodeVarint = _EncodeVarint def EncodePackedField ( write , value ) : write ( tag_bytes ) size = 0 for element in value : size += compute_value_size ( modify_value ( element ) ) local_EncodeVarint ( write , size ) for element in value : encode_value ( write , modify_value ( element ) ) return EncodePackedField elif is_repeated : tag_bytes = TagBytes ( field_number , wire_type ) def EncodeRepeatedField ( write , value ) : for element in value : write ( tag_bytes ) encode_value ( write , modify_value ( element ) ) return EncodeRepeatedField else : tag_bytes = TagBytes ( field_number , wire_type ) def EncodeField ( write , value ) : write ( tag_bytes ) return encode_value ( write , modify_value ( value ) ) return EncodeField return SpecificEncoder