parameters: (field_number)
return_statement: return EncodeField
docstring: Encoder for extensions of MessageSet.
  
    The message set message looks like this:
      message MessageSet {
        repeated group Item = 1 {
          required int32 type_id = 2;
          required string message = 3;
        }
      }
docstring_summary: Encoder for extensions of MessageSet.
docstring_tokens: Encoder for extensions of MessageSet .
function: def MessageSetItemEncoder(field_number):
    """Encoder for extensions of MessageSet.
  
    The message set message looks like this:
      message MessageSet {
        repeated group Item = 1 {
          required int32 type_id = 2;
          required string message = 3;
        }
      }
    """
    start_bytes = b"".join([
        TagBytes(1, wire_format.WIRETYPE_START_GROUP),
        TagBytes(2, wire_format.WIRETYPE_VARINT),
        _VarintBytes(field_number),
        TagBytes(3, wire_format.WIRETYPE_LENGTH_DELIMITED)])
    end_bytes = TagBytes(1, wire_format.WIRETYPE_END_GROUP)
    local_EncodeVarint = _EncodeVarint
  
    def EncodeField(write, value):
      write(start_bytes)
      local_EncodeVarint(write, value.ByteSize())
      value._InternalSerialize(write)
      return write(end_bytes)
  
    return EncodeField
function_tokens: def MessageSetItemEncoder ( field_number ) : start_bytes = b"" . join ( [ TagBytes ( 1 , wire_format . WIRETYPE_START_GROUP ) , TagBytes ( 2 , wire_format . WIRETYPE_VARINT ) , _VarintBytes ( field_number ) , TagBytes ( 3 , wire_format . WIRETYPE_LENGTH_DELIMITED ) ] ) end_bytes = TagBytes ( 1 , wire_format . WIRETYPE_END_GROUP ) local_EncodeVarint = _EncodeVarint def EncodeField ( write , value ) : write ( start_bytes ) local_EncodeVarint ( write , value . ByteSize ( ) ) value . _InternalSerialize ( write ) return write ( end_bytes ) return EncodeField