<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def build_hardware_controller( cls, config: robot_configs.robot_config = None, port: str = None, loop: asyncio.AbstractEventLoop = None, force: bool = False) -> 'API': """ Build a hardware controller that will actually talk to hardware. This method should not be used outside of a real robot, and on a real robot only one true hardware controller may be active at one time. :param config: A config to preload. If not specified, load the default. :param port: A port to connect to. If not specified, the default port (found by scanning for connected FT232Rs). :param loop: An event loop to use. If not specified, use the result of :py:meth:`asyncio.get_event_loop`. :param force: If `True`, connect even if a lockfile is present. See :py:meth:`Controller.__init__`. """

        if None is Controller:
            raise RuntimeError(
                'The hardware controller may only be instantiated on a robot')
        checked_loop = loop or asyncio.get_event_loop()
        backend = Controller(config, checked_loop, force=force)
        await backend.connect(port)
        return cls(backend, config=config, loop=checked_loop)