class_docstr: Generate proposal for the Random Walk Metropolis algorithm.
  
  Warning: this kernel will not result in a chain which converges to the
  `target_log_prob`. To get a convergent MCMC, use
  `tfp.mcmc.RandomWalkMetropolisNormal(...)` or
  `tfp.mcmc.MetropolisHastings(tfp.mcmc.UncalibratedRandomWalk(...))`.
  
  For more details on `UncalibratedRandomWalk`, see
  `RandomWalkMetropolis`.
class_docstr_tok: ["Generate","proposal","for","the","Random","Walk","Metropolis","algorithm",".","Warning",":","this","kernel","will","not","result","in","a","chain","which","converges","to","the","`","target_log_prob","`",".","To","get","a","convergent","MCMC",",","use","`","tfp.mcmc.RandomWalkMetropolisNormal","(","...",")","`","or","`","tfp.mcmc.MetropolisHastings","(","tfp.mcmc.UncalibratedRandomWalk","(","...",")",")","`",".","For","more","details","on","`","UncalibratedRandomWalk","`",",","see","`","RandomWalkMetropolis","`","."]
code: def one_step(self, current_state, previous_kernel_results, seed=None):
      with tf.name_scope(
          mcmc_util.make_name(self.name, "rwm", "one_step")
      ):
          with tf.name_scope("initialize"):
              if mcmc_util.is_list_like(current_state):
                  current_state_parts = list(current_state)
              else:
                  current_state_parts = [current_state]
              current_state_parts = [
                  tf.convert_to_tensor(s, name="current_state")
                  for s in current_state_parts
              ]
  
          seed = samplers.sanitize_seed(seed)  # Retain for diagnostics.
          state_fn_kwargs = {}
          if self.experimental_shard_axis_names is not None:
              state_fn_kwargs[
                  "experimental_shard_axis_names"
              ] = self.experimental_shard_axis_names
  
          next_state_parts = (
              self.new_state_fn(  # pylint: disable=not-callable
                  current_state_parts, seed, **state_fn_kwargs
              )
          )
  
          # User should be using a new_state_fn that does not alter the state size.
          # This will fail noisily if that is not the case.
          for next_part, current_part in zip(
              next_state_parts, current_state_parts
          ):
              tensorshape_util.set_shape(next_part, current_part.shape)
  
          # Compute `target_log_prob` so its available to MetropolisHastings.
          next_target_log_prob = self.target_log_prob_fn(
              *next_state_parts
          )  # pylint: disable=not-callable
  
          def maybe_flatten(x):
              return (
                  x if mcmc_util.is_list_like(current_state) else x[0]
              )
  
          return [
              maybe_flatten(next_state_parts),
              UncalibratedRandomWalkResults(
                  log_acceptance_correction=tf.zeros_like(
                      next_target_log_prob
                  ),
                  target_log_prob=next_target_log_prob,
                  seed=seed,
              ),
          ]
  
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribute_lib
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc import metropolis_hastings
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 7 for calling the UncalibratedRandomWalk obj's underlying member method code with example usage: obj.one_step(current_state, previous_kernel_results, seed) and returns: list, unknown