code: def insert_into_docstring(parameters=False, return_values=False):
      """
      Decorator to insert a single entry into an existing docstring. Use
      standard {} format parameters in your docstring, and then use this
      decorator to insert the standard type information for that variable.
  
      Examples
      --------
  
      @insert_into_docstring(parameters=[('dense', '(n_samples, n_features)')],
                             return_values=[('dense', '(n_samples, n_features)'),
                                            ('dense',
                                             '(n_samples, n_features)')])
      def kneighbors(self, X=None, n_neighbors=None, return_distance=True,
                     convert_dtype=True):
          \"""
          Query the GPU index for the k nearest neighbors of column vectors in X.
  
          Parameters
          ----------
          X : {}
  
          n_neighbors : Integer
              Number of neighbors to search. If not provided, the n_neighbors
              from the model instance is used (default=10)
  
          return_distance: Boolean
              If False, distances will not be returned
  
          convert_dtype : bool, optional (default = True)
              When set to True, the kneighbors method will automatically
              convert the inputs to np.float32.
  
          Returns
          -------
          distances : {}
              The distances of the k-nearest neighbors for each column vector
              in X
  
          indices : {}
              The indices of the k-nearest neighbors for each column vector in X
          \"""
  
      Parameters
      ----------
      parameters : list of tuples
          List of tuples, each tuple containing: (type, shape) for the type
          and shape of each parameter to be inserted. Current accepted values
          are `dense` and `dense_sparse`.
      return_values : list of tuples
          List of tuples, each tuple containing: (type, shape) for the type
          and shape of each parameter to be inserted. Current accepted values
          are `dense` and `dense_sparse`.
  
      """
  
      def deco(func):
          # List of parameters to use in `format` call of the docstring
          to_add = []
  
          # See if we need to add parameter data types
          if parameters:
              for par in parameters:
                  to_add.append(
                      _parameters_docstrings[par[0]][9:].format(
                          shape=par[1]
                      )
                  )
  
          # See if we need to add return value data types
          if return_values:
              for ret in return_values:
                  to_add.append(
                      _return_values_docstrings[
                          ret[0] + "_datatype"
                      ].format(shape=ret[1])
                  )
  
          if len(to_add) > 0:
              func.__doc__ = str(inspect.getdoc(func)).format(*to_add)
  
          func.__doc__ += "\n\n"
  
          return func
  
      return deco
  
label_desc: Use image node_id 2 for calling a global function with example usage: insert_into_docstring(parameters, return_values) and returns: deco, func