human
Complete this python program:
def convert_yielded(yielded):
assistant
#Here is the Python code you requested.

    """Convert a yielded object into a `.Future`.
    The default implementation accepts lists, dictionaries, and Futures.
    If the `~functools.singledispatch` library is available, this function
    may be extended to support additional types. For example::
    @convert_yielded.register(asyncio.Future)
    def _(asyncio_future):
    return tornado.platform.asyncio.to_tornado_future(asyncio_future)
    .. versionadded:: 4.1
    """
    if isinstance(yielded, (list, dict)):
        return multi_future(yielded)
    elif is_future(yielded):
        return yielded
    else:
        raise BadYieldError(('yielded    unknown    object    %r' % (yielded,)))