Convert an object into an Asset or sequence of Assets.

        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.

        Parameters
        ----------
        obj : int, str, Asset, ContinuousFuture, or iterable
            The object to be converted into one or more Assets.
            Integers are interpreted as sids. Strings are interpreted as
            tickers. Assets and ContinuousFutures are returned unchanged.
        as_of_date : pd.Timestamp or None
            Timestamp to use to disambiguate ticker lookups. Has the same
            semantics as in `lookup_symbol`.
        country_code : str or None
            ISO-3166 country code to use to disambiguate ticker lookups. Has
            the same semantics as in `lookup_symbol`.

        Returns
        -------
        matches, missing : tuple
            ``matches`` is the result of the conversion. ``missing`` is a list
             containing any values that couldn't be resolved. If ``obj`` is not
             an iterable, ``missing`` will be an empty list.

def lookup_generic(self, obj, as_of_date, country_code):
        """
        Convert an object into an Asset or sequence of Assets.

        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.

        Parameters
        ----------
        obj : int, str, Asset, ContinuousFuture, or iterable
            The object to be converted into one or more Assets.
            Integers are interpreted as sids. Strings are interpreted as
            tickers. Assets and ContinuousFutures are returned unchanged.
        as_of_date : pd.Timestamp or None
            Timestamp to use to disambiguate ticker lookups. Has the same
            semantics as in `lookup_symbol`.
        country_code : str or None
            ISO-3166 country code to use to disambiguate ticker lookups. Has
            the same semantics as in `lookup_symbol`.

        Returns
        -------
        matches, missing : tuple
            ``matches`` is the result of the conversion. ``missing`` is a list
             containing any values that couldn't be resolved. If ``obj`` is not
             an iterable, ``missing`` will be an empty list.
        """
        matches = []
        missing = []

        # Interpret input as scalar.
        if isinstance(obj, (AssetConvertible, ContinuousFuture)):
            self._lookup_generic_scalar(
                obj=obj,
                as_of_date=as_of_date,
                country_code=country_code,
                matches=matches,
                missing=missing,
            )
            try:
                return matches[0], missing
            except IndexError:
                if hasattr(obj, '__int__'):
                    raise SidsNotFound(sids=[obj])
                else:
                    raise SymbolNotFound(symbol=obj)

        # Interpret input as iterable.
        try:
            iterator = iter(obj)
        except TypeError:
            raise NotAssetConvertible(
                "Input was not a AssetConvertible "
                "or iterable of AssetConvertible."
            )

        for obj in iterator:
            self._lookup_generic_scalar(
                obj=obj,
                as_of_date=as_of_date,
                country_code=country_code,
                matches=matches,
                missing=missing,
            )

        return matches, missing