code: def _convert_inputs(model, X, is_train):
      xp2tensorflow_ = lambda x: xp2tensorflow(
          x, requires_grad=is_train
      )
      converted = convert_recursive(is_xp_array, xp2tensorflow_, X)
      if isinstance(converted, ArgsKwargs):
  
          def reverse_conversion(dXtf):
              return convert_recursive(
                  is_tensorflow_array, tensorflow2xp, dXtf
              )
  
          return converted, reverse_conversion
      elif isinstance(converted, dict):
  
          def reverse_conversion(dXtf):
              dX = convert_recursive(
                  is_tensorflow_array, tensorflow2xp, dXtf
              )
              return dX.kwargs
  
          return (
              ArgsKwargs(args=tuple(), kwargs=converted),
              reverse_conversion,
          )
      elif isinstance(converted, (tuple, list)):
  
          def reverse_conversion(dXtf):
              dX = convert_recursive(
                  is_tensorflow_array, tensorflow2xp, dXtf
              )
              return dX.args
  
          return (
              ArgsKwargs(args=converted, kwargs={}),
              reverse_conversion,
          )
      else:
  
          def reverse_conversion(dXtf):
              dX = convert_recursive(
                  is_tensorflow_array, tensorflow2xp, dXtf
              )
              return dX.args[0]
  
          return (
              ArgsKwargs(args=(converted,), kwargs={}),
              reverse_conversion,
          )
  
file_path: thinc/thinc/layers/tensorflowwrapper.py
imports: from typing import Any, Callable, Dict, Optional, Tuple, Type, TypeVar
  import srsly
  from ..compat import tensorflow
  from ..model import Model
  from ..shims import TensorFlowShim, keras_model_fns, maybe_handshake_model
  from ..types import ArgsKwargs, ArrayXd
  from ..util import assert_tensorflow_installed, convert_recursive, is_tensorflow_array, is_xp_array, tensorflow2xp, xp2tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: _convert_inputs(model, X, is_train) and returns: converted,  reverse_conversion, convert_recursive, ArgsKwargs,  reverse_conversion, dX, ArgsKwargs,  reverse_conversion, ArgsKwargs,  reverse_conversion, dX, dX