code: def testDurationSerializeAndParse(self):
      message = duration_pb2.Duration()
      # Generated output should contain 3, 6, or 9 fractional digits.
      message.seconds = 0
      message.nanos = 0
      self.CheckDurationConversion(message, "0s")
      message.nanos = 10000000
      self.CheckDurationConversion(message, "0.010s")
      message.nanos = 10000
      self.CheckDurationConversion(message, "0.000010s")
      message.nanos = 10
      self.CheckDurationConversion(message, "0.000000010s")
  
      # Test min and max
      message.seconds = 315576000000
      message.nanos = 999999999
      self.CheckDurationConversion(message, "315576000000.999999999s")
      message.seconds = -315576000000
      message.nanos = -999999999
      self.CheckDurationConversion(message, "-315576000000.999999999s")
  
      # Parsing accepts an fractional digits as long as they fit into nano
      # precision.
      message.FromJsonString("0.1s")
      self.assertEqual(100000000, message.nanos)
      message.FromJsonString("0.0000001s")
      self.assertEqual(100, message.nanos)
  
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 2 for calling the TimeUtilTest obj's underlying member method code with example usage: obj.testDurationSerializeAndParse() without return types