def marshal(self, o, use_value_list=False):
        """
        Packages the return from a parser for easy use in a rule.
        """

        if o is None:
            return
        elif isinstance(o, dict):
            if use_value_list:
                for k, v in o.items():
                    o[k] = [v]
            return o
        elif isinstance(o, six.string_types):
            if use_value_list:
                return {o: [True]}
            else:
                return {o: True}
        else:
            raise TypeError("Marshaller doesn't support given type %s" % type(o))
def marshal ( self , o , use_value_list = False ) : if o is None : return elif isinstance ( o , dict ) : if use_value_list : for k , v in o . items ( ) : o [ k ] = [ v ] return o elif isinstance ( o , six . string_types ) : if use_value_list : return { o : [ True ] } else : return { o : True } else : raise TypeError ( "Marshaller doesn't support given type %s" % type ( o ) )
Packages the return from a parser for easy use in a rule.