def get_access_token(self, target_id, scope, grant_type):
        """

        :param target_id:
        :param scope:
        :param grant_type:
        :return:
        """
        # No default, either there is an explicit policy or there is not
        try:
            lifetime = self.token_policy['access_token'][target_id][grant_type]
        except __HOLE__:
            raise NotAllowed(
                'Access token for grant_type {} for target_id {} not allowed')

        sid = rndstr(32)
        return self.token_factory(sid, target_id=target_id, scope=scope,
                                  grant_type=grant_type, lifetime=lifetime)
dataset/ETHPy150Open rohe/pyoidc/src/oic/utils/token_handler.py/TokenHandler.get_access_token