def standardize(self, spec_response, field_mapping, response_time, approved):
        """
        Translates gateway specific response into Paython generic response.
        Expects list or dictionary for spec_repsonse & dictionary for field_mapping.
        """
        # manual settings
        self.RESPONSE_FIELDS['response_time'] = response_time
        self.RESPONSE_FIELDS['approved'] = approved

        if isinstance(spec_response, list): # list settings
            i = 0
            debug_string = 'paython.gateways.core.standardize() -- spec_response: '
            logger.debug(debug_string.center(80, '='))
            logger.debug('\n%s' % spec_response)
            debug_string = 'paython.gateways.core.standardize() -- field_mapping: '
            logger.debug(debug_string.center(80, '='))
            logger.debug('\n%s' % field_mapping)

            for item in spec_response:
                iteration_key = str(i) #stringifying because the field_mapping keys are strings
                if iteration_key in field_mapping:
                    self.RESPONSE_FIELDS[field_mapping[iteration_key]] = item
                i += 1
        else: # dict settings
            for key, value in spec_response.items():
                try:
                    self.RESPONSE_FIELDS[field_mapping[key]] = value
                except KeyError:
                    pass #its okay to fail if we dont have a translation

        #send it back!
        return self.RESPONSE_FIELDS
dataset/ETHPy150Open abunsen/Paython/paython/gateways/core.py/Gateway.standardize/original