def one_step(self, current_state, previous_kernel_results):
with tf.compat.v1.name_scope(<EOL>name=mcmc_util.make_name(self.name, '<STR_LIT>', '<STR_LIT>'),<EOL>values=[self._seed_stream,<EOL>current_state,<EOL>previous_kernel_results.log_likelihood]):<EOL><INDENT>with tf.compat.v1.name_scope('<STR_LIT>'):<EOL><INDENT>[<EOL>init_state_parts,<EOL>init_log_likelihood<EOL>] = _prepare_args(<EOL>self.log_likelihood_fn,<EOL>current_state,<EOL>previous_kernel_results.log_likelihood)<EOL><DEDENT>normal_samples = self.normal_sampler_fn(self._seed_stream())  <EOL>normal_samples = list(normal_samples) if mcmc_util.is_list_like(<EOL>normal_samples) else [normal_samples]<EOL>u = tf.random.uniform(<EOL>shape=tf.shape(init_log_likelihood),<EOL>seed=self._seed_stream(),<EOL>dtype=init_log_likelihood.dtype.base_dtype,<EOL>)<EOL>threshold = init_log_likelihood + tf.math.log(u)<EOL>starting_angle = tf.random.uniform(<EOL>shape=tf.shape(init_log_likelihood),<EOL>minval=<NUM_LIT:0.>,<EOL>maxval=<NUM_LIT:2> * np.pi,<EOL>name='<STR_LIT>',<EOL>seed=self._seed_stream(),<EOL>dtype=init_log_likelihood.dtype.base_dtype,<EOL>)<EOL>starting_angle_min = starting_angle - <NUM_LIT:2> * np.pi<EOL>starting_angle_max = starting_angle<EOL>starting_state_parts = _rotate_on_ellipse(<EOL>init_state_parts, normal_samples, starting_angle)<EOL>starting_log_likelihood = self.log_likelihood_fn(*starting_state_parts)  <EOL>def chain_not_done(<EOL>angle,<EOL>angle_min,<EOL>angle_max,<EOL>current_state_parts,<EOL>current_log_likelihood):<EOL><INDENT>del angle, angle_min, angle_max, current_state_parts<EOL>return tf.reduce_any(current_log_likelihood < threshold)<EOL><DEDENT>def sample_next_angle(<EOL>angle,<EOL>angle_min,<EOL>angle_max,<EOL>current_state_parts,<EOL>current_log_likelihood):<EOL><INDENT>"""<STR_LIT>"""<EOL>chain_not_done = current_log_likelihood < threshold<EOL>angle_min = tf.where(<EOL>tf.math.logical_and(angle < <NUM_LIT:0>, chain_not_done),<EOL>angle,<EOL>angle_min)<EOL>angle_max = tf.where(<EOL>tf.math.logical_and(angle >= <NUM_LIT:0>, chain_not_done),<EOL>angle,<EOL>angle_max)<EOL>new_angle = tf.random.uniform(<EOL>shape=tf.shape(current_log_likelihood),<EOL>minval=angle_min,<EOL>maxval=angle_max,<EOL>seed=self._seed_stream(),<EOL>dtype=angle.dtype.base_dtype<EOL>)<EOL>angle = tf.where(chain_not_done, new_angle, angle)<EOL>next_state_parts = _rotate_on_ellipse(<EOL>init_state_parts, normal_samples, angle)<EOL>new_state_parts = []<EOL>broadcasted_chain_not_done = _right_pad_with_ones(<EOL>chain_not_done, tf.rank(next_state_parts[<NUM_LIT:0>]))<EOL>for n_state, c_state in zip(next_state_parts, current_state_parts):<EOL><INDENT>new_state_part = tf.where(<EOL>tf.broadcast_to(<EOL>broadcasted_chain_not_done,<EOL>tf.shape(n_state)),<EOL>n_state,<EOL>c_state)<EOL>new_state_parts.append(new_state_part)<EOL><DEDENT>return (<EOL>angle,<EOL>angle_min,<EOL>angle_max,<EOL>new_state_parts,<EOL>self.log_likelihood_fn(*new_state_parts)  <EOL>)<EOL><DEDENT>[<EOL>next_angle,<EOL>_,<EOL>_,<EOL>next_state_parts,<EOL>next_log_likelihood,<EOL>] = tf.while_loop(<EOL>cond=chain_not_done,<EOL>body=sample_next_angle,<EOL>loop_vars=[<EOL>starting_angle,<EOL>starting_angle_min,<EOL>starting_angle_max,<EOL>starting_state_parts,<EOL>starting_log_likelihood<EOL>])<EOL>return [<EOL>next_state_parts if mcmc_util.is_list_like(<EOL>current_state) else next_state_parts[<NUM_LIT:0>],<EOL>EllipticalSliceSamplerKernelResults(<EOL>log_likelihood=next_log_likelihood,<EOL>angle=next_angle,<EOL>normal_samples=normal_samples,<EOL>),<EOL>]<EOL><DEDENT>
Runs one iteration of the Elliptical Slice Sampler.

        Args:
          current_state: `Tensor` or Python `list` of `Tensor`s representing the
            current state(s) of the Markov chain(s). The first `r` dimensions
            index independent chains,
            `r = tf.rank(log_likelihood_fn(*normal_sampler_fn()))`.
          previous_kernel_results: `collections.namedtuple` containing `Tensor`s
            representing values from previous calls to this function (or from the
            `bootstrap_results` function.)

        Returns:
          next_state: Tensor or Python list of `Tensor`s representing the state(s)
            of the Markov chain(s) after taking exactly one step. Has same type and
            shape as `current_state`.
          kernel_results: `collections.namedtuple` of internal calculations used to
            advance the chain.

        Raises:
          TypeError: if `not log_likelihood.dtype.is_floating`.