def get_query_class(method):
    """Get class of query strategy from its name.


    Arguments
    ---------
    method: str
        Name of the query strategy, e.g. 'max', 'uncertainty', 'random.
        A special mixed query strategy is als possible. The mix is denoted
        by an underscore: 'max_random' or 'max_uncertainty'.

    Returns
    -------
    BaseQueryModel:
        Class corresponding to the method name.
    """
    from asreview.query_strategies.cluster import ClusterQuery
    from asreview.query_strategies.max import MaxQuery
    from asreview.query_strategies.uncertainty import UncertaintyQuery
    from asreview.query_strategies.random import RandomQuery
    from asreview.query_strategies.mixed import MixedQuery
    query_models = {'cluster': ClusterQuery, 'max': MaxQuery, 'uncertainty':
        UncertaintyQuery, 'random': RandomQuery}
    try:
        return query_models[method]
    except KeyError:
        mix = method.split('_')
        if len(mix) == 2:
            return MixedQuery
        raise ValueError(f"Error: query method '{method}' is not implemented.")
