code: def _Deprecated(func):
      """Mark functions as deprecated."""
  
      def NewFunc(*args, **kwargs):
          warnings.warn(
              "Call to deprecated function %s(). Note: Do add unlinked descriptors "
              "to descriptor_pool is wrong. Use Add() or AddSerializedFile() "
              "instead." % func.__name__,
              category=DeprecationWarning,
          )
          return func(*args, **kwargs)
  
      NewFunc.__name__ = func.__name__
      NewFunc.__doc__ = func.__doc__
      NewFunc.__dict__.update(func.__dict__)
      return NewFunc
  
imports: import collections
  import warnings
  from google.protobuf import descriptor
  from google.protobuf import descriptor_database
  from google.protobuf import text_encoding
label_desc: Use image node_id 1 for calling a global function with example usage: _Deprecated(func) and returns: NewFunc, func