code: def is_differentiable_tensor(tensor):
      """Tests if the input is a `tf.Tensor` object with a differentiable dtype."""
      return isinstance(tensor, tf.Tensor) and (
          tensor.dtype.is_floating
          or tensor.dtype.is_complex
          or
          # The following types could be floating point numbers.
          tensor.dtype in (tf.resource, tf.variant)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from absl import logging
  from neural_structured_learning.lib import abstract_gen_neighbor
  from neural_structured_learning.lib import utils
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: is_differentiable_tensor(tensor) and returns: unknown