function getExactlyOneTensor(xs) {
	  var x;

	  if (Array.isArray(xs)) {
	    if (xs.length !== 1) {
	      throw new ValueError("Expected Tensor length to be 1; got " + xs.length);
	    }

	    x = xs[0];
	  } else {
	    x = xs;
	  }

	  return x;
	}
Helper function to obtain exactly one Tensor.
@param xs: A single `tf.Tensor` or an `Array` of `tf.Tensor`s.
@return A single `tf.Tensor`. If `xs` is an `Array`, return the first one.
@throws ValueError: If `xs` is an `Array` and its length is not 1.