Get the data, after performing post-processing if necessary.
969806
def data(self):
        """"""
        data = super(DynamicListSerializer, self).data
        processed_data = ReturnDict(
            SideloadingProcessor(self, data).data,
            serializer=self
        ) if self.child.envelope else ReturnList(
            data,
            serializer=self
        )
        processed_data = post_process(processed_data)
        return processed_data
1077785
def _get_post_data(cls, args):
        ''''''
        if args.post_data:
            return args.post_data
        elif args.post_file:
            return args.post_file.read()
181266
def data(self):
        
        # Cache the data for next time .data is called.
        if self._data is None:
            self._data = self.to_value(self.instance)
        return self._data
1182596
def post_process(self, paths, dry_run=False, **options):
        
        with post_process_error_counter(self):
            with patched_name_fn(self, 'hashed_name', 'hashed name'):
                with patched_name_fn(self, 'url', 'url'):
                    for result in super(LaxPostProcessorMixin,
                                        self).post_process(paths, dry_run, **options):
                        yield result
            error_count = self._post_process_error_count
            if error_count:
                print('%s post-processing error%s.' % (error_count,
                        '' if error_count == 1 else 's'))
462738
def _postprocess(self, filehandle, metadata):
        ""
        for process in self._postprocessors:
            filehandle = process(filehandle, metadata)
        return filehandle
1278847
def process(self, data):
        
        for res in data:
            try:
                cache.dbapi().save(res)
            except Exception:
                LOG.exception('failed to cache result: %s', res.status)
469609
def post_process(self):
        
        self.image.putdata(self.pixels)
        self.image = self.image.transpose(Image.ROTATE_90)
1326528
def getdata(self):
        
        if self.bounding_box:
            return self.image.crop(self.bounding_box).getdata()
8980
def post_process(table, post_processors):
    """"""
    table_result = table
    for processor in post_processors:
        table_result = processor(table_result)
    return table_result
1111783
def _process_results():
    """"""
    async = get_current_async()
    callbacks = async.get_callbacks()

    if not isinstance(async.result.payload, AsyncException):
        callback = callbacks.get('success')
    else:
        callback = callbacks.get('error')

        if not callback:
            raise async.result.payload.exception, None, \
                async.result.payload.traceback[2]

    return _execute_callback(async, callback)
1010678
def process(self, data, **kwargs):
        """"""
        data = super(RequestIdProcessor, self).process(data, **kwargs)
        if g and hasattr(g, 'request_id'):
            tags = data.get('tags', {})
            tags['request_id'] = g.request_id
            data['tags'] = tags
        return data
256625
def postprocess(self, json_string):
        """"""
        is_compressing, is_hash, compressed, spaces = False, False, [], 0
        for row in json_string.split('\n'):
            if is_compressing:
                if (row[:spaces + 5] == ' ' * (spaces + 4) +
                        ('"' if is_hash else '{')):
                    compressed.append(row.rstrip())
                elif (len(row) > spaces and row[:spaces] == ' ' * spaces and
                        re.match('[\]\}],?', row[spaces:].rstrip())):
                    compressed.append(row.rstrip())
                    is_compressing = False
                else:
                    compressed[-1] += ' ' + row.strip()
            else:
                compressed.append(row.rstrip())
                if any(a in row for a in ['edges', 'nodes']):
                    # Fix to handle issues that arise with empty lists
                    if '[]' in row:
                        continue
                    spaces = sum(1 for _ in takewhile(str.isspace, row))
                    is_compressing, is_hash = True, '{' in row
        return '\n'.join(compressed)
1363122
function process(data) {
    //
    // Apply previous post processing.
    //
    data = Pagelet.prototype.postprocess.call(this, data);

    data.stats = {
      outofdate: 0,
      uptodate: 0,
      pinned: 0
    };

    data.shrinkwrap.forEach(function shrinkwrap(module) {
      if (module.pinned) data.stats.pinned++;
      if (module.uptodate) data.stats.uptodate++;
      else data.stats.outofdate++;
    });

    return data;
  }
384785
def get_data(self, **kwargs):
        '''
        
        '''
        if self.queue:
            new = self.apply_queued()
            return new.get_data()
        else:
            return self._get_attr_from_file('data', **kwargs)
826755
def process_response(self, request, response):
        
        if self._is_enabled():
            log_prefix = self._log_prefix(u"After", request)
            new_memory_data = self._memory_data(log_prefix)

            log_prefix = self._log_prefix(u"Diff", request)
            cached_memory_data_response = self._cache.get_cached_response(self.memory_data_key)
            old_memory_data = cached_memory_data_response.get_value_or_default(None)
            self._log_diff_memory_data(log_prefix, new_memory_data, old_memory_data)
        return response
1307138
def fetch_data(self):
        """"""
        # Get http session
        yield from self._get_httpsession()
        # Post login page
        yield from self._post_login_page()
        # Get token
        token_uuid = yield from self._get_token()
        # Get account number
        account_number = yield from self._get_account_number(*token_uuid)
        # List phone numbers
        self._phone_numbers = yield from self._list_phone_numbers(account_number)
        # Get balance
        balance = yield from self._get_balance(account_number)
        self._data['balance'] = balance
        # Get fido dollar
        for number in self._phone_numbers:
            fido_dollar = yield from self._get_fido_dollar(account_number,
                                                           number)
            self._data[number]= {'fido_dollar': fido_dollar}
        # Get usage
        for number in self._phone_numbers:
            usage = yield from self._get_usage(account_number, number)
            self._data[number].update(usage)
170410
def post_process(self, paths, dry_run=False, **options):
        
        if self.postprocess_exclusions:
            paths = dict((k, v) for k, v in paths.items() if not
                    self.exclude_file(k))
        return super(CachedFilesMixin, self).post_process(paths,
                dry_run, **options)