parameters: (
          cls,
          attached_instruments: Dict[types.Mount, Dict[str, Optional[str]]],
          attached_modules: List[str],
          config: RobotConfig,
          loop: asyncio.AbstractEventLoop,
          strict_attached_instruments: bool = True,
      )
return_statement: return cls(
              attached_instruments,
              attached_modules,
              config,
              loop,
              gpio,
              strict_attached_instruments,
          )
docstring: Build the simulator.
  
          Use this factory method rather than the initializer to handle proper GPIO
          initialization.
  
          :param attached_instruments: A dictionary describing the instruments
                                       the simulator should consider attached.
                                       If this argument is specified and
                                       :py:meth:`get_attached_instruments` is
                                       called with expectations that do not
                                       match, the call fails. This is useful for
                                       making the simulator match the real
                                       hardware, for instance to check if a
                                       protocol asks for the right instruments.
                                       This dict should map mounts to either
                                       empty dicts or to dicts containing
                                       'model' and 'id' keys.
          :param attached_modules: A list of module model names (e.g.
                                   `'tempdeck'` or `'magdeck'`) representing
                                   modules the simulator should assume are
                                   attached. Like `attached_instruments`, used
                                   to make the simulator match the setup of the
                                   real hardware.
          :param config: The robot config to use
          :param loop: The asyncio event loop to use.
          :param strict_attached_instruments: This param changes the behavior of
                                              the instrument cache. If ``True``,
                                              (default), ``cache_instrument``
                                              calls requesting instruments not
                                              in ``attached_instruments`` will
                                              fail as if the instrument was not
                                              present. If ``False``, those calls
                                              will still pass but give a response
                                              version of 1, while calls
                                              requesting instruments that _are_
                                              present get the full number.
docstring_summary: Build the simulator.
docstring_tokens: Build the simulator .
function: async def build(
          cls,
          attached_instruments: Dict[types.Mount, Dict[str, Optional[str]]],
          attached_modules: List[str],
          config: RobotConfig,
          loop: asyncio.AbstractEventLoop,
          strict_attached_instruments: bool = True,
      ) -> Simulator:
          """Build the simulator.
  
          Use this factory method rather than the initializer to handle proper GPIO
          initialization.
  
          :param attached_instruments: A dictionary describing the instruments
                                       the simulator should consider attached.
                                       If this argument is specified and
                                       :py:meth:`get_attached_instruments` is
                                       called with expectations that do not
                                       match, the call fails. This is useful for
                                       making the simulator match the real
                                       hardware, for instance to check if a
                                       protocol asks for the right instruments.
                                       This dict should map mounts to either
                                       empty dicts or to dicts containing
                                       'model' and 'id' keys.
          :param attached_modules: A list of module model names (e.g.
                                   `'tempdeck'` or `'magdeck'`) representing
                                   modules the simulator should assume are
                                   attached. Like `attached_instruments`, used
                                   to make the simulator match the setup of the
                                   real hardware.
          :param config: The robot config to use
          :param loop: The asyncio event loop to use.
          :param strict_attached_instruments: This param changes the behavior of
                                              the instrument cache. If ``True``,
                                              (default), ``cache_instrument``
                                              calls requesting instruments not
                                              in ``attached_instruments`` will
                                              fail as if the instrument was not
                                              present. If ``False``, those calls
                                              will still pass but give a response
                                              version of 1, while calls
                                              requesting instruments that _are_
                                              present get the full number.
          """
          gpio = SimulatingGPIOCharDev("gpiochip0")
          await gpio.setup()
          return cls(
              attached_instruments,
              attached_modules,
              config,
              loop,
              gpio,
              strict_attached_instruments,
          )
function_tokens: async def build ( cls , attached_instruments : Dict [ types . Mount , Dict [ str , Optional [ str ] ] ] , attached_modules : List [ str ] , config : RobotConfig , loop : asyncio . AbstractEventLoop , strict_attached_instruments : bool = True , ) -> Simulator : gpio = SimulatingGPIOCharDev ( "gpiochip0" ) await gpio . setup ( ) return cls ( attached_instruments , attached_modules , config , loop , gpio , strict_attached_instruments , )