code: def testSnakeCaseToCamelCase(self):
      self.assertEqual(
          "fooBar", well_known_types._SnakeCaseToCamelCase("foo_bar")
      )
      self.assertEqual(
          "FooBar", well_known_types._SnakeCaseToCamelCase("_foo_bar")
      )
      self.assertEqual(
          "foo3Bar", well_known_types._SnakeCaseToCamelCase("foo3_bar")
      )
  
      # No uppercase letter is allowed.
      self.assertRaisesRegexp(
          well_known_types.Error,
          "Fail to print FieldMask to Json string: Path name Foo must "
          "not contain uppercase letters.",
          well_known_types._SnakeCaseToCamelCase,
          "Foo",
      )
      # Any character after a "_" must be a lowercase letter.
      #   1. "_" cannot be followed by another "_".
      #   2. "_" cannot be followed by a digit.
      #   3. "_" cannot appear as the last character.
      self.assertRaisesRegexp(
          well_known_types.Error,
          "Fail to print FieldMask to Json string: The character after a "
          '"_" must be a lowercase letter in path name foo__bar.',
          well_known_types._SnakeCaseToCamelCase,
          "foo__bar",
      )
      self.assertRaisesRegexp(
          well_known_types.Error,
          "Fail to print FieldMask to Json string: The character after a "
          '"_" must be a lowercase letter in path name foo_3bar.',
          well_known_types._SnakeCaseToCamelCase,
          "foo_3bar",
      )
      self.assertRaisesRegexp(
          well_known_types.Error,
          'Fail to print FieldMask to Json string: Trailing "_" in path '
          "name foo_bar_.",
          well_known_types._SnakeCaseToCamelCase,
          "foo_bar_",
      )
  
imports: from datetime import datetime
  from google.protobuf import any_pb2
  from google.protobuf import duration_pb2
  from google.protobuf import field_mask_pb2
  from google.protobuf import struct_pb2
  from google.protobuf import timestamp_pb2
  from google.protobuf import unittest_pb2
  from google.protobuf.internal import any_test_pb2
  from google.protobuf.internal import test_util
  from google.protobuf.internal import well_known_types
  from google.protobuf import descriptor
  from google.protobuf import text_format
label_desc: Use image node_id 7 for calling the FieldMaskTest obj's underlying member method code with example usage: obj.testSnakeCaseToCamelCase() without return types