code: def testFromEpisodeWithCompositeTensorOfTensors(self):
      observation = tf.SparseTensor(
          indices=tf.random.uniform((7, 2), maxval=9, dtype=tf.int64),
          values=tf.random.uniform((7,)),
          dense_shape=[4, 10],
      )  # The 4 is important, it must match reward length.
      action = ()
      policy_info = ()
      reward = tf.random.uniform((4,))
      traj = trajectory.from_episode(
          observation, action, policy_info, reward, discount=None
      )
      self.assertTrue(tf.is_tensor(traj.step_type))
      traj_val, obs_val, reward_val = self.evaluate(
          (traj, observation, reward)
      )
      first = ts.StepType.FIRST
      mid = ts.StepType.MID
      last = ts.StepType.LAST
      self.assertAllEqual(traj_val.step_type, [first, mid, mid, mid])
      self.assertAllEqual(
          traj_val.next_step_type, [mid, mid, mid, last]
      )
      self.assertAllClose(traj_val.observation, obs_val)
      self.assertAllEqual(traj_val.reward, reward_val)
      self.assertAllEqual(traj_val.discount, [1.0, 1.0, 1.0, 1.0])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import numpy
  import tensorflow
  from tf_agents.drivers import dynamic_episode_driver
  from tf_agents.drivers import test_utils
  from tf_agents.environments import tf_py_environment
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.utils import test_utils
label_desc: Use image node_id 11 for calling the TrajectoryTest obj's underlying member method code with example usage: obj.testFromEpisodeWithCompositeTensorOfTensors() without return types