docstr: Check some different types with custom comparator.
docstr_tok: ["Check","some","different","types","with","custom","comparator","."]
code: def testSortingRepeatedScalarFieldsCustomComparator(self):
      """Check some different types with custom comparator."""
      message = unittest_pb2.TestAllTypes()
  
      message.repeated_int32.append(-3)
      message.repeated_int32.append(-2)
      message.repeated_int32.append(-1)
      message.repeated_int32.sort(lambda x, y: cmp(abs(x), abs(y)))
      self.assertEqual(message.repeated_int32[0], -1)
      self.assertEqual(message.repeated_int32[1], -2)
      self.assertEqual(message.repeated_int32[2], -3)
  
      message.repeated_string.append("aaa")
      message.repeated_string.append("bb")
      message.repeated_string.append("c")
      message.repeated_string.sort(lambda x, y: cmp(len(x), len(y)))
      self.assertEqual(message.repeated_string[0], "c")
      self.assertEqual(message.repeated_string[1], "bb")
      self.assertEqual(message.repeated_string[2], "aaa")
  
imports: import copy
  import math
  import operator
  import pickle
  import unittest
  from google.protobuf import unittest_import_pb2
  from google.protobuf import unittest_pb2
  from google.protobuf.internal import api_implementation
  from google.protobuf.internal import test_util
  from google.protobuf import message
label_desc: Use image node_id 16 for calling the MessageTest obj's underlying member method code with example usage: obj.testSortingRepeatedScalarFieldsCustomComparator() without return types