def GroupSizer(field_number, is_repeated, is_packed):
 tag_size = (_TagSize(field_number) * 2)
 assert (not is_packed)
 if is_repeated:
  def RepeatedFieldSize(value):
   result = (tag_size * len(value))
   for element in value:
    result += element.ByteSize()
   return result
  return RepeatedFieldSize
 else:
  def FieldSize(value):
   return (tag_size + value.ByteSize())
  return FieldSize

def GroupSizer ( field_number , is_repeated , is_packed ) : tag_size = ( _TagSize ( field_number ) * 2 ) assert ( not is_packed ) if is_repeated : def RepeatedFieldSize ( value ) : result = ( tag_size * len ( value ) ) for element in value : result += element . ByteSize ( ) return result return RepeatedFieldSize else : def FieldSize ( value ) : return ( tag_size + value . ByteSize ( ) ) return FieldSize
returns a sizer for a group field .