code: def SetAllNonLazyFields(message):
      """Sets every non-lazy field in the message to a unique value.
  
      Args:
        message: A unittest_pb2.TestAllTypes instance.
      """
  
      #
      # Optional fields.
      #
  
      message.optional_int32 = 101
      message.optional_int64 = 102
      message.optional_uint32 = 103
      message.optional_uint64 = 104
      message.optional_sint32 = 105
      message.optional_sint64 = 106
      message.optional_fixed32 = 107
      message.optional_fixed64 = 108
      message.optional_sfixed32 = 109
      message.optional_sfixed64 = 110
      message.optional_float = 111
      message.optional_double = 112
      message.optional_bool = True
      # TODO(robinson): Firmly spec out and test how
      # protos interact with unicode.  One specific example:
      # what happens if we change the literal below to
      # u'115'?  What *should* happen?  Still some discussion
      # to finish with Kenton about bytes vs. strings
      # and forcing everything to be utf8. :-/
      message.optional_string = "115"
      message.optional_bytes = "116"
  
      message.optionalgroup.a = 117
      message.optional_nested_message.bb = 118
      message.optional_foreign_message.c = 119
      message.optional_import_message.d = 120
      message.optional_public_import_message.e = 126
  
      message.optional_nested_enum = unittest_pb2.TestAllTypes.BAZ
      message.optional_foreign_enum = unittest_pb2.FOREIGN_BAZ
      message.optional_import_enum = unittest_import_pb2.IMPORT_BAZ
  
      message.optional_string_piece = "124"
      message.optional_cord = "125"
  
      #
      # Repeated fields.
      #
  
      message.repeated_int32.append(201)
      message.repeated_int64.append(202)
      message.repeated_uint32.append(203)
      message.repeated_uint64.append(204)
      message.repeated_sint32.append(205)
      message.repeated_sint64.append(206)
      message.repeated_fixed32.append(207)
      message.repeated_fixed64.append(208)
      message.repeated_sfixed32.append(209)
      message.repeated_sfixed64.append(210)
      message.repeated_float.append(211)
      message.repeated_double.append(212)
      message.repeated_bool.append(True)
      message.repeated_string.append("215")
      message.repeated_bytes.append("216")
  
      message.repeatedgroup.add().a = 217
      message.repeated_nested_message.add().bb = 218
      message.repeated_foreign_message.add().c = 219
      message.repeated_import_message.add().d = 220
      message.repeated_lazy_message.add().bb = 227
  
      message.repeated_nested_enum.append(unittest_pb2.TestAllTypes.BAR)
      message.repeated_foreign_enum.append(unittest_pb2.FOREIGN_BAR)
      message.repeated_import_enum.append(
          unittest_import_pb2.IMPORT_BAR
      )
  
      message.repeated_string_piece.append("224")
      message.repeated_cord.append("225")
  
      # Add a second one of each field.
      message.repeated_int32.append(301)
      message.repeated_int64.append(302)
      message.repeated_uint32.append(303)
      message.repeated_uint64.append(304)
      message.repeated_sint32.append(305)
      message.repeated_sint64.append(306)
      message.repeated_fixed32.append(307)
      message.repeated_fixed64.append(308)
      message.repeated_sfixed32.append(309)
      message.repeated_sfixed64.append(310)
      message.repeated_float.append(311)
      message.repeated_double.append(312)
      message.repeated_bool.append(False)
      message.repeated_string.append("315")
      message.repeated_bytes.append("316")
  
      message.repeatedgroup.add().a = 317
      message.repeated_nested_message.add().bb = 318
      message.repeated_foreign_message.add().c = 319
      message.repeated_import_message.add().d = 320
      message.repeated_lazy_message.add().bb = 327
  
      message.repeated_nested_enum.append(unittest_pb2.TestAllTypes.BAZ)
      message.repeated_foreign_enum.append(unittest_pb2.FOREIGN_BAZ)
      message.repeated_import_enum.append(
          unittest_import_pb2.IMPORT_BAZ
      )
  
      message.repeated_string_piece.append("324")
      message.repeated_cord.append("325")
  
      #
      # Fields that have defaults.
      #
  
      message.default_int32 = 401
      message.default_int64 = 402
      message.default_uint32 = 403
      message.default_uint64 = 404
      message.default_sint32 = 405
      message.default_sint64 = 406
      message.default_fixed32 = 407
      message.default_fixed64 = 408
      message.default_sfixed32 = 409
      message.default_sfixed64 = 410
      message.default_float = 411
      message.default_double = 412
      message.default_bool = False
      message.default_string = "415"
      message.default_bytes = "416"
  
      message.default_nested_enum = unittest_pb2.TestAllTypes.FOO
      message.default_foreign_enum = unittest_pb2.FOREIGN_FOO
      message.default_import_enum = unittest_import_pb2.IMPORT_FOO
  
      message.default_string_piece = "424"
      message.default_cord = "425"
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/deps/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/test_util.py
imports: import os.path
  from google.protobuf import unittest_import_pb2
  from google.protobuf import unittest_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: SetAllNonLazyFields(message) without return types