Handle processing when the result argument provided is a document key.
193960
def _handle_result_by_key(self, key):
        
        invalid_options = ('key', 'keys', 'startkey', 'endkey')
        if any(x in invalid_options for x in self.options):
            raise ResultException(102, invalid_options, self.options)
        return self._ref(key=key, **self.options)
1024416
def process_result_value(self, value, dialect):
        """"""
        if value is not None:
            value = simplejson.loads(value)
        return value
77866
function processAuthResultForEntity(err, entity) {

        if(stopAll) return

        if(err && err.code !== ACL_ERROR_CODE) {
          stopAll = true
          callback(err, undefined)
        } else {

          if(entity) {
            filteredEntities.push(entity)
          }
          callbackCount ++
          if(callbackCount === entities.length) {
            callback(undefined, filteredEntities)
          }
        }
      }
1307236
def handle_delete_key(self):
        """"""
        track_id = self.reader.int()
        row = self.reader.int()
        logger.info(" -> track=%s, row=%s", track_id, row)

        # Delete the actual track value
        track = self.tracks.get_by_id(track_id)
        track.delete(row)
191677
function (key) {
      if (key === undefined) {
        that.push({
          key: 'DOCUMENT' + sep + docId + sep,
          lastPass: true
        })
        return end()
      }
      that.options.indexes.get(key, function (err, val) {
        if (!err) {
          that.push({
            key: key,
            value: val
          })
        }
        pushValue(docFields[i++])
      })
    }
1144246
def handle_annotation_key(self, line: str, position: int, tokens: ParseResults) -> ParseResults:
        
        key = tokens['key']
        self.raise_for_missing_citation(line, position)
        self.raise_for_undefined_annotation(line, position, key)
        return tokens
1300707
def handleHeader(self, key, value):
        """"""

        if key == 'CIMError':
            self.CIMError = urllib.parse.unquote(value)
        if key == 'PGErrorDetail':
            self.PGErrorDetail = urllib.parse.unquote(value)
512054
function processRetrievedDocument(document, filePrismicMetadata, queryKey, ctx) {
            // add the complete result except for the data fragments
            var result = _.omit(document, 'fragments');
            result.data = {};

            // process the data fragments, invoking helpers to make the data more usable
            if (document.fragments != null && Object.keys(document.fragments).length  > 0) {
                for (var fragmentFullName in document.fragments) {

                    // strip the document type from the fragment name
                    var fragmentName = fragmentFullName.substr(fragmentFullName.lastIndexOf('.') + 1);

                    var fragment = document.fragments[fragmentFullName];
                    result.data[fragmentName] = processSingleFragment(fragment, ctx, filePrismicMetadata[queryKey]);
                }
            }

            return result;
        }
112458
def _handle_status(self, key, value):
        
        if key in ("GOOD_PASSPHRASE"):
            pass
        elif key == "KEY_CONSIDERED":
            self.status = key.replace("_", " ").lower()
        elif key == "KEY_NOT_CREATED":
            self.status = 'key not created'
        elif key == "KEY_CREATED":
            (self.type, self.fingerprint) = value.split()
            self.status = 'key created'
        elif key == "NODATA":
            self.status = nodata(value)
        elif key == "PROGRESS":
            self.status = progress(value.split(' ', 1)[0])
        elif key == "PINENTRY_LAUNCHED":
            log.warn(("GnuPG has just attempted to launch whichever pinentry "
                      "program you have configured, in order to obtain the "
                      "passphrase for this key.  If you did not use the "
                      "`passphrase=` parameter, please try doing so.  Otherwise, "
                      "see Issues #122 and #137:"
                      "\nhttps://github.com/isislovecruft/python-gnupg/issues/122"
                      "\nhttps://github.com/isislovecruft/python-gnupg/issues/137"))
            self.status = 'key not created'
        elif (key.startswith("TRUST_") or
              key.startswith("PKA_TRUST_") or
              key == "NEWSIG"):
            pass
        else:
            raise ValueError("Unknown status message: %r" % key)

        if self.type in ('B', 'P'):
            self.primary_created = True
        if self.type in ('B', 'S'):
            self.subkey_created = True
515201
function processPartitionKeys(keys){
    var result = "(",
        j,
        len,
        keyGroup;

    if(typeof keys === 'string'){
        return result += keys + ")";
    }

    len = keys.length;
    for(j = 0; j< keys.length; j++){
        keyGroup = keys[j];
        if(keyGroup instanceof Array){
            result += "(";
            result += keyGroup.join(", ");
            result += ")";
        }else{
            result += keyGroup;
        }
        result += (j < len-1) ? ", " : "";
    }
    result += ")";

    return result;
}
868010
def process_results(self, results=None, **value):
        """"""
        for res in results:
            if 'mask' in res:
                res['mask'] = utils.IrcString(res['mask'])
            value['success'] = res.pop('retcode', None) != '486'
            value.update(res)
        return value
748312
def _handleLegacyResult(result):
    
    if not isinstance(result, dict):
        warnings.warn('The Gerrit status callback uses the old way to '
                      'communicate results.  The outcome might be not what is '
                      'expected.')
        message, verified, reviewed = result
        result = makeReviewResult(message,
                                  (GERRIT_LABEL_VERIFIED, verified),
                                  (GERRIT_LABEL_REVIEWED, reviewed))
    return result
161273
async function handleCallError (result) {
  const error = Buffer.from(result.returnValue).toString()
  if (isBase64(error.slice(3))) {
    const decodedError = Buffer.from(error.slice(3), 'base64').toString()
    throw Object.assign(Error(`Invocation failed: ${error}. Decoded: ${decodedError}`), R.merge(result, { error, decodedError }))
  }

  const decodedError = await this.contractDecodeData('string', error)
  throw Object.assign(Error(`Invocation failed: ${error}. Decoded: ${decodedError}`), R.merge(result, { error, decodedError }))
}
478283
def process_result_value(self, value: Optional[str],
                             dialect: Dialect) -> List[str]:
        """"""
        retval = self._dbstr_to_strlist(value)
        return retval
58898
protected void processResult(RHI aggregatedResult) {
        // Process the result with all result handlers
        for (ResultHandler<RHI> resultHandler : resultHandlers) {
            resultHandler.handleResult(aggregatedResult);
        }
    }
864174
def process_document(self, doc, std):
        """"""
        if doc.url not in self.blacklist:
            print("Indexing '%s' %s..." % (doc.url, std))
            name = self.extract_name(doc.text)
            self.results.add((name, doc.url, std))
        else:
            print("Skipping blacklisted page '%s' ..." % doc.url)
            return None
732045
def make_result(self, key, value):
        
        v = OperationResult()
        v.key = key
        return v