<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build(cls, builder, *args, build_loop=None, **kwargs):
 """ Build a hardware control API and initialize the adapter in one call :param builder: the builder method to use (e.g. :py:meth:`hardware_control.API.build_hardware_simulator`) :param args: Args to forward to the builder method :param kwargs: Kwargs to forward to the builder method """

        loop = asyncio.new_event_loop()
        kwargs['loop'] = loop
        args = [arg for arg in args
                if not isinstance(arg, asyncio.AbstractEventLoop)]
        if asyncio.iscoroutinefunction(builder):
            checked_loop = build_loop or asyncio.get_event_loop()
            api = checked_loop.run_until_complete(builder(*args, **kwargs))
        else:
            api = builder(*args, **kwargs)
        return cls(api, loop)