Get the release ID of the deployment immediately
        before the "current" deployment, ``None`` if no previous
        release could be determined.

        This method performs two network operations.

        :return: The release ID of the release previous to the
            "current" release.
        :rtype: str

def get_previous_release(self):
        """Get the release ID of the deployment immediately
        before the "current" deployment, ``None`` if no previous
        release could be determined.

        This method performs two network operations.

        :return: The release ID of the release previous to the
            "current" release.
        :rtype: str
        """
        releases = self.get_releases()
        if not releases:
            return None

        current = self.get_current_release()
        if not current:
            return None

        try:
            current_idx = releases.index(current)
        except ValueError:
            return None

        try:
            return releases[current_idx + 1]
        except IndexError:
            return None