(self)
Return the maximum step of `intermediate_values` in the trial.

        Returns:
            The maximum step of intermediates.
Return the maximum step of `intermediate_values` in the trial.
Return the maximum step of intermediate_values in the trial .
def last_step(self) -> Optional[int]:
        """Return the maximum step of `intermediate_values` in the trial.

        Returns:
            The maximum step of intermediates.
        """

        if len(self.intermediate_values) == 0:
            return None
        else:
            return max(self.intermediate_values.keys())
def last_step ( self ) -> Optional [ int ] : if len ( self . intermediate_values ) == 0 : return None else : return max ( self . intermediate_values . keys ( ) )