code: def testKerasInterop(self):
      # Return an ndarray from the model.
      inputs = tf.keras.layers.Input(shape=(10,))
      output_layer = tf.keras.layers.Lambda(np.square)(inputs)
      model = tf.keras.Model([inputs], output_layer)
  
      values = onp.arange(10, dtype=onp.float32).reshape((1, 10))
      values_as_array = np.asarray(values)
  
      result = model(values)
      self.assertIsInstance(result, np.ndarray)
      self.assertAllClose(result, onp.square(values))
  
      result = model(values_as_array)
      self.assertIsInstance(result, np.ndarray)
      self.assertAllClose(result, onp.square(values))
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.numpy_ops import np_math_ops
label_desc: Use image node_id 14 for calling the InteropTest obj's underlying member method code with example usage: obj.testKerasInterop() without return types