<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def threadpooled( # noqa: F811 *, loop_getter_need_context: bool = False, ) -> typing.Union[ ThreadPooled, ]: """Post function to ThreadPoolExecutor. :param func: function to wrap :param loop_getter: Method to get event loop, if wrap in asyncio task :type loop_getter: typing.Union[ None, asyncio.AbstractEventLoop ] :param loop_getter_need_context: Loop getter requires function context :type loop_getter_need_context: bool :return: ThreadPooled instance, if called as function or argumented decorator, else callable wrapper """

    if func is None:
        return ThreadPooled(func=func, loop_getter=loop_getter, loop_getter_need_context=loop_getter_need_context)
    return ThreadPooled(  # type: ignore
        func=None, loop_getter=loop_getter, loop_getter_need_context=loop_getter_need_context
    )(func)