@classmethod<EOL><INDENT>def _output_format(cls, func, override=None):<DEDENT>
@wraps(func)<EOL>def _format_wrapper(self, *args, **kwargs):<EOL><INDENT>call_response, data_key, meta_data_key = func(<EOL>self, *args, **kwargs)<EOL>if '<STR_LIT>' in self.output_format.lower() or '<STR_LIT>'in self.output_format.lower():<EOL><INDENT>data = call_response[data_key]<EOL>if meta_data_key is not None:<EOL><INDENT>meta_data = call_response[meta_data_key]<EOL><DEDENT>else:<EOL><INDENT>meta_data = None<EOL><DEDENT>if override is None:<EOL><INDENT>output_format = self.output_format.lower()<EOL><DEDENT>elif '<STR_LIT>' or '<STR_LIT>' in override.lower():<EOL><INDENT>output_format = override.lower()<EOL><DEDENT>if output_format == '<STR_LIT>':<EOL><INDENT>return data, meta_data<EOL><DEDENT>elif output_format == '<STR_LIT>':<EOL><INDENT>if isinstance(data, list):<EOL><INDENT>data_array = []<EOL>for val in data:<EOL><INDENT>data_array.append([v for _, v in val.items()])<EOL><DEDENT>data_pandas = pandas.DataFrame(data_array, columns=[<EOL>k for k, _ in data[<NUM_LIT:0>].items()])<EOL><DEDENT>else:<EOL><INDENT>data_pandas = pandas.DataFrame.from_dict(data,<EOL>orient='<STR_LIT:index>',<EOL>dtype=float)<EOL><DEDENT>data_pandas.index.name = '<STR_LIT:date>'<EOL>if '<STR_LIT>' in self.indexing_type:<EOL><INDENT>data_pandas.reset_index(level=<NUM_LIT:0>, inplace=True)<EOL><DEDENT>return data_pandas, meta_data<EOL><DEDENT><DEDENT>elif '<STR_LIT>' in self.output_format.lower():<EOL><INDENT>return call_response, None<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>self.output_format))<EOL><DEDENT><DEDENT>return _format_wrapper<EOL>
Decorator in charge of giving the output its right format, either
        json or pandas

        Keyword Arguments:
            func:  The function to be decorated
            override:  Override the internal format of the call, default None