<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset_globals(version=None, loop=None):
 """ Reinitialize the global singletons with a given API version. :param version: 1 or 2. If `None`, pulled from the `useProtocolApiV2` advanced setting. """

    global containers
    global instruments
    global labware
    global robot
    global reset
    global modules
    global hardware

    robot, reset, instruments, containers, labware, modules, hardware\
        = build_globals(version, loop)