class_docstr: Base class for the reference tests.
class_docstr_tok: ["Base","class","for","the","reference","tests","."]
docstr: Converts args to tensors.
docstr_tok: ["Converts","args","to","tensors","."]
code: def _as_tensors(self, args):
      """Converts args to tensors."""
      tensor_args = []
      for a in args:
          if isinstance(a, (numbers.Number, list, np.ndarray)):
              tensor_arg = tf.constant(a)
          elif isinstance(a, dict):
              keys = tuple(a.keys())
              tensor_arg = dict(
                  zip(keys, self._as_tensors([a[k] for k in keys]))
              )
          else:
              tensor_arg = a
          tensor_args.append(tensor_arg)
      return tensor_args
  
imports: import io
  import numbers
  import os
  import sys
  import traceback
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling the TestCase obj's underlying member method code with example usage: obj._as_tensors(args) and returns: tensor_args