class_docstr: Tests for CopyTo functions of Descriptor.
code: def testCopyToProto_FileDescriptor(self):
      UNITTEST_IMPORT_FILE_DESCRIPTOR_ASCII = (
          """
        name: 'google/protobuf/unittest_import.proto'
        package: 'protobuf_unittest_import'
        dependency: 'google/protobuf/unittest_import_public.proto'
        message_type: <
          name: 'ImportMessage'
          field: <
            name: 'd'
            number: 1
            label: 1  # Optional
            type: 5  # TYPE_INT32
          >
        >
        """
          + """enum_type: <
          name: 'ImportEnum'
          value: <
            name: 'IMPORT_FOO'
            number: 7
          >
          value: <
            name: 'IMPORT_BAR'
            number: 8
          >
          value: <
            name: 'IMPORT_BAZ'
            number: 9
          >
        >
        options: <
          java_package: 'com.google.protobuf.test'
          optimize_for: 1  # SPEED
        >
        public_dependency: 0
        """
      )
  
      self._InternalTestCopyToProto(
          unittest_import_pb2.DESCRIPTOR,
          descriptor_pb2.FileDescriptorProto,
          UNITTEST_IMPORT_FILE_DESCRIPTOR_ASCII,
      )
  
imports: import unittest
  from google.protobuf import unittest_custom_options_pb2
  from google.protobuf import unittest_import_pb2
  from google.protobuf import unittest_pb2
  from google.protobuf import descriptor_pb2
  from google.protobuf import descriptor
  from google.protobuf import text_format
label_desc: Use image node_id 10 for calling the DescriptorCopyToProtoTest obj's underlying member method code with example usage: obj.testCopyToProto_FileDescriptor() without return types