code: def _preprocess_attributes(attributes):
      '''
      Pre-process incoming queue attributes before setting them
      '''
      if isinstance(attributes, six.string_types):
          attributes = salt.utils.json.loads(attributes)
  
      def stringified(val):
          # Some attributes take full json policy documents, but they take them
          # as json strings. Convert the value back into a json string.
          if isinstance(val, dict):
              return salt.utils.json.dumps(val)
          return val
  
      return dict(
          (attr, stringified(val)) for attr, val in six.iteritems(attributes)
      f _preprocess_attributes(attributes):
      '''
      Pre-process incoming queue attributes before setting them
      '''
      if isinstance(attributes, six.string_types):
          attributes = salt.utils.json.loads(attributes)
  
      def stringified(val):
          # Some attributes take full json policy documents, but they take them
          # as json strings. Convert the value back into a json string.
          if isinstance(val, dict):
              return salt.utils.json.dumps(val)
          return val
  
      return dict(
          (attr, stringified(val)) for attr, val in six.iteritems(attributes)
      )
docs: Pre-process incoming queue attributes before setting them