code: def _validate_claim_request(claims, ignore_errors=False):
      
  
      results = {}
      claims = claims if claims else {}
  
      for name, value in claims.iteritems():
          if value is None:
              results[name] = None
          elif isinstance(value, dict):
              results[name] = _validate_claim_values(name, value, ignore_errors)
          else:
              if not ignore_errors:
                  msg = 'Invalid claim {}.'.format(name)
                  raise ValueError(msg)
  
      return results
docs: Validates a claim request section (`userinfo` or `id_token`) according
      to section 5.5 of the OpenID Connect specification:
  
      - http://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter
  
      Returns a copy of the claim request with only the valid fields and values.
  
      Raises ValueError is the claim request is invalid and `ignore_errors` is False