def add_retry()

in src/stepfunctions/steps/states.py [0:0]


    def add_retry(self, retry):
        """
        Add a retrier or a list of retriers to the tail end of the list of retriers for the state.
        See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-retrying-after-an-error>`_ for more details.

        Args:
            retry (Retry or list(Retry)): A retrier or list of retriers to add.
        """
        if Field.Retry in self.allowed_fields():
            self.retries.extend(retry) if isinstance(retry, list) else self.retries.append(retry)
        else:
            raise ValueError(f"{type(self).__name__} state does not support retry field. ")