code: def testZigZagEncode(self):
      Z = wire_format.ZigZagEncode
      self.assertEqual(0, Z(0))
      self.assertEqual(1, Z(-1))
      self.assertEqual(2, Z(1))
      self.assertEqual(3, Z(-2))
      self.assertEqual(4, Z(2))
      self.assertEqual(0xFFFFFFFE, Z(0x7FFFFFFF))
      self.assertEqual(0xFFFFFFFF, Z(-0x80000000))
      self.assertEqual(0xFFFFFFFFFFFFFFFE, Z(0x7FFFFFFFFFFFFFFF))
      self.assertEqual(0xFFFFFFFFFFFFFFFF, Z(-0x8000000000000000))
  
      self.assertRaises(TypeError, Z, None)
      self.assertRaises(TypeError, Z, "abcd")
      self.assertRaises(TypeError, Z, 0.0)
      self.assertRaises(TypeError, Z, object())
  
file_path: coremltools/deps/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/wire_format_test.py
imports: import unittest
  from google.protobuf import message
  from google.protobuf.internal import wire_format
label_desc: Use image node_id 3 for calling the WireFormatTest obj's underlying member method code with example usage: obj.testZigZagEncode() without return types