code: def override_supported_formats(formats):
      
      def decorator(function):
          @wraps(function)
          def wrapper(self, *args, **kwargs):
              self.supported_formats = formats
              return function(self, *args, **kwargs)
          return wrapper
      return decorator
docs: Override the views class' supported formats for the decorated function.
  
      Arguments:
      formats -- A list of strings describing formats, e.g. ``['html', 'json']``.