def longest_unique_prefix(query, targets, remove_self=True):
    query = op.basename(query)
    targets = [op.basename(x) for x in targets]
    prefix_lengths = [len(op.commonprefix([query, name])) for name in targets]
    if remove_self and len(query) in prefix_lengths:
        prefix_lengths.remove(len(query))
    longest_length = max(prefix_lengths)
    return query[:longest_length + 1]
This callback can be used to initialize an application for the
dataset/ETHPy150Open tanghaibao/jcvi/formats/base.py/longest_unique_prefix--crossover with--dataset/ETHPy150Open lepture/flask-oauthlib/flask_oauthlib/provider/oauth1.py/OAuth1Provider.init_app