<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect(handlers, access_token, scope_request=None, claims_request=None):
 """ Collect all the claims values from the `handlers`. Arguments: handlers (list):
 List of claim :class:`Handler` classes. access_token (:class:AccessToken):
 Associated access token. scope_request (list):
 List of requested scopes. claims_request (dict):
 Dictionary with only the relevant section of a OpenID Connect claims request. Returns a list of the scopes from `scope_request` that are authorized, and a dictionary of the claims associated with the authorized scopes in `scope_request`, and additionally, the authorized claims listed in `claims_request`. """

    user = access_token.user
    client = access_token.client

    # Instantiate handlers. Each handler is instanciated only once, allowing the
    # handler to keep state in-between calls to its scope and claim methods.

    handlers = [cls() for cls in handlers]

    # Find all authorized scopes by including the access_token scopes.  Note
    # that the handlers determine if a scope is authorized, not its presense in
    # the access_token.

    required_scopes = set(REQUIRED_SCOPES)
    token_scopes = set(provider.scope.to_names(access_token.scope))
    authorized_scopes = _collect_scopes(handlers, required_scopes | token_scopes, user, client)

    # Select only the authorized scopes from the requested scopes.

    scope_request = set(scope_request) if scope_request else set()
    scopes = required_scopes | (authorized_scopes & scope_request)

    # Find all authorized claims names for the authorized_scopes.

    authorized_names = _collect_names(handlers, authorized_scopes, user, client)

    # Select only the requested claims if no scope has been requested. Selecting
    # scopes has prevalence over selecting claims.

    claims_request = _validate_claim_request(claims_request)

    # Add the requested claims that are authorized to the response.

    requested_names = set(claims_request.keys()) & authorized_names
    names = _collect_names(handlers, scopes, user, client) | requested_names

    # Get the values for the claims.

    claims = _collect_values(
        handlers,
        names=names,
        user=user,
        client=client,
        values=claims_request or {}
    )

    return authorized_scopes, claims