def _output_format_sector(func, override=None):
@wraps(func)<EOL>def _format_wrapper(self, *args, **kwargs):<EOL><INDENT>json_response, data_key, meta_data_key = func(<EOL>self, *args, **kwargs)<EOL>if isinstance(data_key, list):<EOL><INDENT>data = {key: {k: self.percentage_to_float(v)<EOL>for k, v in json_response[key].items()} for key in data_key}<EOL><DEDENT>else:<EOL><INDENT>data = json_response[data_key]<EOL><DEDENT>meta_data = json_response[meta_data_key]<EOL>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>data_pandas = pandas.DataFrame.from_dict(data,<EOL>orient='<STR_LIT>')<EOL>col_names = [re.sub(r'<STR_LIT>', '<STR_LIT>', name).strip('<STR_LIT:U+0020>')<EOL>for name in list(data_pandas)]<EOL>data_pandas.columns = col_names<EOL>return data_pandas, meta_data<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 (replacing the % for usable floats, range 0-1.0)

        Keyword Arguments:
            func: The function to be decorated
            override: Override the internal format of the call, default None
        Returns:
            A decorator for the format sector api call