<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_outputs(self, *outputs):
 """ Set the outputs of the view """

        self._outputs = OrderedDict()
        for output in outputs:
            out_name = None
            type_or_serialize = None
            if isinstance((list, tuple), output):
                if len(output) == 1:
                    out_name = output[0]
                elif len(output) == 2:
                    out_name = output[0]
                    type_or_serialize = output[1]
                else:
                    raise ValueError("invalid output format")
            else:
                out_name = output
            self.add_output(out_name, type_or_serialize)