@classmethod
        def fix_up(cls, command):
            """ Verifies :code:`command` class structure and configures the
            :code:`command.map` method.

            Verifies that :code:`command` derives from :code:`ReportingCommand`
            and overrides :code:`ReportingCommand.reduce`. It then configures
            :code:`command.reduce`, if an overriding implementation of
            :code:`ReportingCommand.reduce` has been provided.

            :param command: :code:`ReportingCommand` class

            Exceptions:

            :code:`TypeError` :code:`command` class is not derived from :code:`ReportingCommand`
            :code:`AttributeError` No :code:`ReportingCommand.reduce` override

            """
            if not issubclass(command, ReportingCommand):
                raise TypeError('%s is not a ReportingCommand' % command)

            if command.reduce == ReportingCommand.reduce:
                raise AttributeError('No ReportingCommand.reduce override')

            f = vars(command)['map']   # Function backing the map method
                # There is no way to add custom attributes to methods. See
                # [Why does setattr fail on a method](http://goo.gl/aiOsqh)
                # for an explanation.

            if f == vars(ReportingCommand)['map']:
                cls._requires_preop = False
                return

            try:
                settings = f._settings
            except __HOLE__:
                f.ConfigurationSettings = StreamingCommand.ConfigurationSettings
                return

            # Create new `StreamingCommand.ConfigurationSettings` class

            module = '.'.join([command.__module__, command.__name__, 'map'])
            name = 'ConfigurationSettings'
            bases = (StreamingCommand.ConfigurationSettings,)

            f.ConfigurationSettings = ConfigurationSettingsType(
                module, name, bases, settings)
            del f._settings
            return

        #endregion

    #endregion
dataset/ETHPy150Open splunk/splunk-ref-pas-code/spikes/googledrive_addon/bin/splunklib/searchcommands/reporting_command.py/ReportingCommand.ConfigurationSettings.fix_up