def METHOD_NAME(self, inputs: TimeStep, state):
    """override predict_step
    Args:
        inputs (TimeStep): time step structure
        state (nested Tensor): network state for ``encoder``
    Returns:
        AlgStep:
        - output: encoding result
        - state: rnn state from ``encoder``
    """
    if self._time_step_as_input:
        output, state = self._encoder(inputs, state=state)
    else:
        output, state = self._encoder(inputs.observation, state=state)
    if self._output_fields is not None:
        output = get_nested_field(output, self._output_fields)
    return AlgStep(output=output, state=state)