def get_lookup(channel):
    """ find the lookup class for the named channel.  this is used internally """
    try:
        lookup_label = settings.AJAX_LOOKUP_CHANNELS[channel]
    except (__HOLE__, AttributeError):
        raise ImproperlyConfigured("settings.AJAX_LOOKUP_CHANNELS not configured correctly for %r" % channel)

    if isinstance(lookup_label,dict):
        # 'channel' : dict(model='app.model', search_field='title' )
        # generate a simple channel dynamically
        return make_channel( lookup_label['model'], lookup_label['search_field'] )
    else:
        # 'channel' : ('app.module','LookupClass')
        # from app.module load LookupClass and instantiate
        lookup_module = __import__( lookup_label[0],{},{},[''])
        lookup_class = getattr(lookup_module,lookup_label[1] )
        return lookup_class()
dataset/ETHPy150Open caseywstark/colab/colab/apps/ajax_select/__init__.py/get_lookup