class_docstr: Tests functions related to composite tensors.
class_docstr_tok: ["Tests","functions","related","to","composite","tensors","."]
code: def testSliceFrom(self):
      from_1 = composite.slice_from(self._x, axis=1, start=1)
      from_n1 = composite.slice_from(self._x, axis=1, start=-1)
      x, from_1, from_n1 = self.evaluate((self._x, from_1, from_n1))
      self.assertAllEqual(from_1, x[:, 1:, :])
      self.assertAllEqual(from_n1, x[:, -1:, :])
  
      s_from_1 = _to_dense(
          composite.slice_from(self._sx, axis=1, start=1)
      )
      s_from_n1 = _to_dense(
          composite.slice_from(self._sx, axis=1, start=-1)
      )
      sx = _to_dense(self._sx)
      sx, s_from_1, s_from_n1 = self.evaluate((sx, s_from_1, s_from_n1))
      self.assertAllEqual(s_from_1, sx[:, 1:, :])
      self.assertAllEqual(s_from_n1, sx[:, -1:, :])
  
file_path: agents/tf_agents/utils/composite_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tf_agents.utils import composite
label_desc: Use image node_id 2 for calling the CompositeTest obj's underlying member method code with example usage: obj.testSliceFrom() without return types