def _euler_method(random_draw_parts,<EOL>state_parts,<EOL>drift_parts,<EOL>step_size_parts,<EOL>volatility_parts,<EOL>name=None):
with tf.compat.v1.name_scope(name, '<STR_LIT>', [<EOL>random_draw_parts, state_parts, drift_parts, step_size_parts,<EOL>volatility_parts<EOL>]):<EOL><INDENT>proposed_state_parts = []<EOL>for random_draw, state, drift, step_size, volatility in zip(<EOL>random_draw_parts,<EOL>state_parts,<EOL>drift_parts,<EOL>step_size_parts,<EOL>volatility_parts):<EOL><INDENT>proposal = state + drift + volatility * tf.sqrt(step_size) * random_draw<EOL>proposed_state_parts.append(proposal)<EOL><DEDENT>return proposed_state_parts<EOL><DEDENT>
Applies one step of Euler-Maruyama method.

    Generates proposal of the form:

    ```python
    tfd.Normal(loc=state_parts + _get_drift(state_parts, ...),
               scale=tf.sqrt(step_size * volatility_fn(current_state)))
    ```

    `_get_drift(state_parts, ..)` is a diffusion drift value at `state_parts`.


    Args:
      random_draw_parts: Python `list` of `Tensor`s containing the value(s) of the
        random perturbation variable(s). Must broadcast with the shape of
        `state_parts`.
      state_parts: Python `list` of `Tensor`s representing the current
        state(s) of the Markov chain(s).
      drift_parts: Python `list` of `Tensor`s representing value of the drift
        `_get_drift(*state_parts, ..)`. Must broadcast with the shape of
        `state_parts`.
      step_size_parts: Python `list` of `Tensor`s representing the step size for
        the Euler-Maruyama method. Must broadcast with the shape of
        `state_parts`.  Larger step sizes lead to faster progress, but
        too-large step sizes make rejection exponentially more likely. When
        possible, it's often helpful to match per-variable step sizes to the
        standard deviations of the target distribution in each variable.
      volatility_parts: Python `list` of `Tensor`s representing the value of
        `volatility_fn(*state_parts)`. Must broadcast with the shape of
        `state_parts`.
      name: Python `str` name prefixed to Ops created by this function.
        Default value: `None` (i.e., 'mala_euler_method').

    Returns:
      proposed_state_parts: Tensor or Python list of `Tensor`s representing the
        state(s) of the Markov chain(s) at each result step. Has same shape as
        input `current_state_parts`.