claims : typing.Sequence[~SingularClaim]
        Returns -> typing.Sequence[~ErrorResult]
518155
async def Claim(self, claims):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Singular',
                   request='Claim',
                   version=2,
                   params=_params)
        _params['claims'] = claims
        reply = await self.rpc(msg)
        return reply
254589
def get_user_claims(self, access_token, claims=None, token_type='Bearer'):
        """"""
        data = self.get_json(
            self.USER_INFO_URL,
            headers={'Authorization': '{token_type} {token}'.format(token_type=token_type, token=access_token)}
        )

        if claims:
            claims_names = set(claims)
            data = {k: v for (k, v) in six.iteritems(data) if k in claims_names}

        return data
299001
public static Claims claims(Map<String, Object> claims) {
        return Classes.newInstance("io.jsonwebtoken.impl.DefaultClaims", MAP_ARG, claims);
    }
501746
@Override
    public Builder claimFrom(String jsonOrJwt, String claim) throws InvalidClaimException, InvalidTokenException {
        if (JwtUtils.isNullEmpty(claim)) {
            String err = Tr.formatMessage(tc, "JWT_INVALID_CLAIM_ERR", new Object[] { claim });
            throw new InvalidClaimException(err);
        }
        if (isValidToken(jsonOrJwt)) {
            String decoded = jsonOrJwt;
            if (JwtUtils.isBase64Encoded(jsonOrJwt)) {
                decoded = JwtUtils.decodeFromBase64String(jsonOrJwt);
            }
            boolean isJson = JwtUtils.isJson(decoded);

            if (!isJson) {
                String jwtPayload = JwtUtils.getPayload(jsonOrJwt);
                decoded = JwtUtils.decodeFromBase64String(jwtPayload);
            }

            // } else {
            // // either decoded payload from jwt or encoded/decoded json string
            // if (JwtUtils.isBase64Encoded(jsonOrJwt)) {
            // decoded = JwtUtils.decodeFromBase64String(jsonOrJwt);
            // }
            // }

            if (decoded != null) {
                Object claimValue = null;
                try {
                    if ((claimValue = JwtUtils.claimFromJsonObject(decoded, claim)) != null) {
                        claims.put(claim, claimValue);
                    }
                } catch (JoseException e) {
                    String err = Tr.formatMessage(tc, "JWT_INVALID_TOKEN_ERR");
                    throw new InvalidTokenException(err);
                }
            }
        }

        return this;
    }
885583
def claimInterface(self, interface):
        
        """
        if isinstance(interface, Interface):
            interface = interface.interfaceNumber

        util.claim_interface(self.dev, interface)
        self.__claimed_interface = interface
1307366
async def issueClaims(self, allClaimRequest: Dict[ID, ClaimRequest]) -> \
            Dict[ID, Claims]:
        
        res = {}
        for schemaId, claimReq in allClaimRequest.items():
            res[schemaId] = await self.issueClaim(schemaId, claimReq)
        return res
455200
def typeseq(types):
    
    ret = ""
    for t in types:
        ret += termcap.get(fmttypes[t])
    
    return ret
378470
private Claims getClaimsFromToken(String token) {
        Claims claims;
        try {
            claims = Jwts.parser()
                    .setSigningKey(jwtProperties.getSecret())
                    .parseClaimsJws(token)
                    .getBody();
        } catch (Exception e) {
            log.error("get claims from jwt token error : {}", e.getMessage());
            claims = null;
        }
        return claims;
    }
1050216
private Map<String, Object> getUserinfoFromRegistryMap(Set<String> claims,
            Map<String, Object> inputMap,
            boolean isJson) throws Exception {
        Map<String, Object> result = inputMap;

        VMMService vmmService = JwtUtils.getVMMService();
        if (vmmService != null) {
            PropertyControl vmmServiceProps = new PropertyControl();
            Properties claimsToVMMProperties = new Properties();
            if (!claims.isEmpty()) {
                // Properties claimsToVMMProps = jwtConfig.getClaimToUserRegistryMap(); //TODO
                for (String claim : claims) {
                    String vmmProperty = claim;// claimsToVMMProps.getProperty(claim);
                    // if (vmmProperty == null) {
                    // vmmProperty = claim;
                    // if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    // Tr.debug(tc, "claim: " + claim + "  is not mapped to a vmm property, using the claim name as the vmm property name");
                    // }
                    // }
                    // else if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    // Tr.debug(tc, "claim: " + claim + "  mapped to vmmProperty: " + vmmProperty);
                    // }

                    claimsToVMMProperties.put(claim, vmmProperty);
                    vmmServiceProps.getProperties().add(vmmProperty);
                }
            }
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "claimsToVMMProperties: " + claimsToVMMProperties);
                Tr.debug(tc, "getting VMM properties: " + vmmServiceProps.getProperties());
            }
            if (!vmmServiceProps.getProperties().isEmpty()) {
                // Call VMM to get the user's properties
                // IdentifierType id = new IdentifierType();
                // String uniqueId = RegistryHelper.getUserRegistry(null).getUniqueUserId(userName);
                // id.setUniqueName(uniqueId);
                // Entity entity = new Entity();
                // entity.setIdentifier(id);
                // Root root = new Root();
                // root.getEntities().add(entity);
                // root.getControls().add(vmmServiceProps);
                // root = vmmService.get(root);
                // PersonAccount person = (PersonAccount) root.getEntities().get(0);
                PersonAccount person = getUser(vmmService, vmmServiceProps);
                // Now add the claims/values to the JSON
                for (Entry<Object, Object> e : claimsToVMMProperties.entrySet()) {
                    String claim = (String) e.getKey();
                    String vmmProperty = (String) e.getValue();
                    Object value = person.get(vmmProperty);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "get for claim: " + claim + "  vmmProperty: " + vmmProperty + ", returned: " + value);
                    }
                    String strValue = vmmPropertyToString(value);
                    if (strValue != null && !strValue.isEmpty()) {
                        result.put(claim, strValue);
                        // if (isJson && claim.equals("address")) {
                        // JSONObject addressJSON = new JSONObject();
                        // addressJSON.put("formatted", strValue);
                        // result.put(claim, addressJSON);
                        // } else {
                        // result.put(claim, strValue);
                        // }
                    }
                }
            }
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "VMM service not available - not returning any extra claims");
            }
        }

        return result;
    }
749070
static Claim extractClaim(String claimName, Map<String, JsonNode> tree, ObjectReader objectReader) {
        JsonNode node = tree.get(claimName);
        return claimFromNode(node, objectReader);
    }
930800
private void writeTaskClaim(Tenant tenant, String claimID, long claimStamp) {
        DBTransaction dbTran = DBService.instance(tenant).startTransaction();
        dbTran.addColumn(TaskManagerService.TASKS_STORE_NAME, claimID, m_hostClaimID, claimStamp);
        DBService.instance(tenant).commit(dbTran);
    }
997192
def is_sequence(obj):
    """"""
    return isinstance(obj, Sequence) and not (
        isinstance(obj, str) or BinaryClass.is_valid_type(obj))
503450
func (ctx *facadeContext) SingularClaimer() (lease.Claimer, error) {
	if ctx.r.shared.featureEnabled(feature.LegacyLeases) {
		return ctx.State().SingularClaimer(), nil
	}
	return ctx.r.shared.leaseManager.Claimer(
		lease.SingularControllerNamespace,
		ctx.State().ModelUUID(),
	)
}
689468
def Verify(self, mempool):
        
        if not super(ClaimTransaction, self).Verify(mempool):
            return False

        # wat does this do
        # get all claim transactions from mempool list
        # that are not this claim
        # and gather all the claims of those claim transactions
        # and see if they intersect the claims of this transaction
        # and if that number is greater than zero that we do not verify
        # (now, to do that in python)
        # if (mempool.OfType < ClaimTransaction > ().Where(p => p != this).SelectMany(p= > p.Claims).Intersect(Claims).Count() > 0)
        # return false;

        # im sorry about the below
        otherclaimTxs = [tx for tx in mempool if tx is ClaimTransaction and tx is not self]
        for other in otherclaimTxs:
            # check to see if the length of the intersection between this objects claim's and the other txs claims is > 0
            if len([list(filter(lambda x: x in self.Claims, otherClaims)) for otherClaims in other.Claims]):
                return False

        txResult = None
        for tx in self.GetTransactionResults():
            if tx.AssetId == Blockchain.SystemCoin().Hash:
                txResult = tx
                break

        if txResult is None or txResult.Amount > Fixed8(0):
            return False

        try:
            return Blockchain.CalculateBonusIgnoreClaimed(self.Claims, False) == -txResult.Amount

        except Exception as e:
            logger.error('Could not calculate bonus: %s ' % e)

        return False
545968
function(sequence, i)
	{
		if ( i == undefined ) i = 0;
		
		var output = [];
		var len = sequence.length;
		i += 1;

		// [foo, bar, ...]
		while ( i < len )
		{
			switch ( sequence.charAt(i) )
			{
				case '[':
					// nested sequence
					output.push(this.parseSequence(sequence, i));
					i = this.i;
					break;
				case '{':
					// nested mapping
					output.push(this.parseMapping(sequence, i));
					i = this.i;
					break;
				case ']':
					this.i = i;
					return output;
				case ',':
				case ' ':
					break;
				default:
					var isQuoted = this.inArray(sequence.charAt(i), ['"', "'"]);
					var value = this.parseScalar(sequence, [',', ']'], ['"', "'"], i);
					i = this.i;
					
					if ( !isQuoted && (value+'').indexOf(': ') != -1 )
					{
						// embedded mapping?
						try
						{
							value = this.parseMapping('{'+value+'}');
						}
						catch ( e )
						{
							if ( !(e instanceof YamlParseException ) ) throw e;
							// no, it's not
						}
					}

					output.push(value);

					i--;
			}

			i++;
		}

		throw new YamlParseException('Malformed inline YAML string "'+sequence+'"');
	}
752059
function expectAliClaimKeys() {
    return bobTestClient.awaitOneTimeKeyUpload().then((keys) => {
        aliTestClient.httpBackend.when(
            "POST", "/keys/claim",
        ).respond(200, function(path, content) {
            const claimType = content.one_time_keys[bobUserId][bobDeviceId];
            expect(claimType).toEqual("signed_curve25519");
            let keyId = null;
            for (keyId in keys) {
                if (bobTestClient.oneTimeKeys.hasOwnProperty(keyId)) {
                    if (keyId.indexOf(claimType + ":") === 0) {
                        break;
                    }
                }
            }
            const result = {};
            result[bobUserId] = {};
            result[bobUserId][bobDeviceId] = {};
            result[bobUserId][bobDeviceId][keyId] = keys[keyId];
            return {one_time_keys: result};
        });
    }).then(() => {
        // it can take a while to process the key query, so give it some extra
        // time, and make sure the claim actually happens rather than ploughing on
        // confusingly.
        return aliTestClient.httpBackend.flush("/keys/claim", 1, 500).then((r) => {
            expect(r).toEqual(1, "Ali did not claim Bob's keys");
        });
    });
}
364279
async def claimTask(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["claimTask"], *args, **kwargs)