def ensure_new_style_deprecation(cli_ctx, kwargs, object_type):
        """ Helper method to make the previous string-based deprecate_info kwarg
            work with the new style. """
        deprecate_info = kwargs.get('deprecate_info', None)
        if isinstance(deprecate_info, Deprecated):
            deprecate_info.object_type = object_type
        elif isinstance(deprecate_info, STRING_TYPES):
            deprecate_info = Deprecated(cli_ctx, redirect=deprecate_info, object_type=object_type)
        kwargs['deprecate_info'] = deprecate_info
        return deprecate_info
Helper method to make the previous string-based deprecate_info kwarg
            work with the new style.