code: def _ensure_exists(wrapped):
      '''
      Decorator to ensure that the named container exists.
      '''
      @functools.wraps(wrapped)
      def check_exists(name, *args, **kwargs):
          if not exists(name):
              raise CommandExecutionError(
                  'Container \'{0}\' does not exist'.format(name)
              )
          return wrapped(name, *args, **salt.utils.args.clean_kwargs(**kwargs))
      return check_existf _ensure_exists(wrapped):
      '''
      Decorator to ensure that the named container exists.
      '''
      @functools.wraps(wrapped)
      def check_exists(name, *args, **kwargs):
          if not exists(name):
              raise CommandExecutionError(
                  'Container \'{0}\' does not exist'.format(name)
              )
          return wrapped(name, *args, **salt.utils.args.clean_kwargs(**kwargs))
      return check_exists
docs: Decorator to ensure that the named container exists.