def create_token_response(self, request, token_handler):
        headers = {
            'Content-Type': 'application/json',
            'Cache-Control': 'no-store',
            'Pragma': 'no-cache',
        }
        try:
            if self.request_validator.client_authentication_required(request):
                log.debug('Authenticating client, %r.', request)
                if not self.request_validator.authenticate_client(request):
                    log.debug('Client authentication failed, %r.', request)
                    raise errors.InvalidClientError(request=request)
            elif not self.request_validator.authenticate_client_id(request.client_id, request):
                log.debug('Client authentication failed, %r.', request)
                raise errors.InvalidClientError(request=request)
            log.debug('Validating access token request, %r.', request)
            self.validate_token_request(request)
        except errors.OAuth2Error as e:
            log.debug('Client error in token request, %s.', e)
            return headers, e.json, e.status_code

        token = token_handler.create_token(request, self.refresh_token)
        log.debug('Issuing token %r to client id %r (%r) and username %s.',
                  token, request.client_id, request.client, request.username)
        return headers, json.dumps(token), 200
Merge holiday calendars together. The base calendar
dataset/ETHPy150Open idan/oauthlib/oauthlib/oauth2/rfc6749/grant_types/resource_owner_password_credentials.py/ResourceOwnerPasswordCredentialsGrant.create_token_response--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/tseries/holiday.py/AbstractHolidayCalendar.merge_class