'Convert a AssetConvertible or iterable of AssetConvertibles into
a list of Asset objects.
This method exists primarily as a convenience for implementing
user-facing APIs that can handle multiple kinds of input.  It should
not be used for internal code where we already know the expected types
of our inputs.
Returns a pair of objects, the first of which is the result of the
conversion, and the second of which is a list containing any values
that couldn\'t be resolved.'

def lookup_generic(self, asset_convertible_or_iterable, as_of_date):

    matches = []
    missing = []
    if isinstance(asset_convertible_or_iterable, AssetConvertible):
        self._lookup_generic_scalar(asset_convertible=asset_convertible_or_iterable, as_of_date=as_of_date, matches=matches, missing=missing)
        try:
            return (matches[0], missing)
        except IndexError:
            if hasattr(asset_convertible_or_iterable, '__int__'):
                raise SidsNotFound(sids=[asset_convertible_or_iterable])
            else:
                raise SymbolNotFound(symbol=asset_convertible_or_iterable)
    elif isinstance(asset_convertible_or_iterable, ContinuousFuture):
        return (asset_convertible_or_iterable, missing)
    try:
        iterator = iter(asset_convertible_or_iterable)
    except TypeError:
        raise NotAssetConvertible('Input    was    not    a    AssetConvertible    or    iterable    of    AssetConvertible.')
    for obj in iterator:
        if isinstance(obj, ContinuousFuture):
            matches.append(obj)
        else:
            self._lookup_generic_scalar(obj, as_of_date, matches, missing)
    return (matches, missing)
