class_docstr: Adapter class to wrap Function with FunctionNode.
  
  While :class:`~chainer.FunctionNode` provides the interface
  of new-style differentiable functions, the old-style
  :class:`~chainer.Function` can still be used for the backward
  compatibility.
  This class provides an adapter of there interface; it adds
  :class:`~chainer.FunctionNode` interface to any
  :class:`~chainer.Function` object by delegation.
  
  .. note::
  
     The ownership of :class:`FunctionAdapter` and :class:`~chainer.Function`
     is a bit tricky.
     At the initialization, :class:`FunctionAdapter` is owned by the
     :class:`~chainer.Function` object.
     Once the function is applied to variables, the ownership is reversed;
     the adapter becomes the owner of the
     :class:`~chainer.Function` object and the :class:`~chainer.Function`
     object changes the reference to a weak one.
  
  Args:
      function (~chainer.Function): The function object to wrap.
  
  .. versionadded:: 3.0.0
class_docstr_tok: ["Adapter","class","to","wrap","Function","with","FunctionNode",".","While",":","class",":","`","~chainer.FunctionNode","`","provides","the","interface","of","new-style","differentiable","functions",",","the","old-style",":","class",":","`","~chainer.Function","`","can","still","be","used","for","the","backward","compatibility",".","This","class","provides","an","adapter","of","there","interface",";","it","adds",":","class",":","`","~chainer.FunctionNode","`","interface","to","any",":","class",":","`","~chainer.Function","`","object","by","delegation",".","..","note",":",":","The","ownership","of",":","class",":","`","FunctionAdapter","`","and",":","class",":","`","~chainer.Function","`","is","a","bit","tricky",".","At","the","initialization",",",":","class",":","`","FunctionAdapter","`","is","owned","by","the",":","class",":","`","~chainer.Function","`","object",".","Once","the","function","is","applied","to","variables",",","the","ownership","is","reversed",";","the","adapter","becomes","the","owner","of","the",":","class",":","`","~chainer.Function","`","object","and","the",":","class",":","`","~chainer.Function","`","object","changes","the","reference","to","a","weak","one",".","Args",":","function","(","~chainer.Function",")",":","The","function","object","to","wrap",".","..","versionadded",":",":","3.0.0"]
code: def forward(self, inputs):
      # Retain all inputs by default in old-style functions.
      self.retain_inputs(six.moves.range(len(inputs)))
      if self._is_chainerx_fallback_mode:
          with function_node._chainerx_attribute_fallback(
              self._function, self.chainerx_device
          ):
              return self._function.forward(inputs)
      else:
          return self._function.forward(inputs)
  
imports: from __future__ import absolute_import
  import warnings
  import weakref
  import six
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import configuration
  from chainer.function_hook import FunctionHook
  from chainer import function_node
  from chainer import variable
  import chainerx
label_desc: Use image node_id 6 for calling the FunctionAdapter obj's underlying member method code with example usage: obj.forward(inputs) and returns: self, self