def METHOD_NAME(path: Path) -> SimulatorSetup:
    """Load a simulator setup from a file."""
    with path.open() as f:
        obj = json.load(f)
    if "machine" not in obj:
        warn(
            "Simulator configuration does not name a machine, defaulting to OT-2 Standard"
        )
    machine_type = obj.get("machine", "OT-2 Standard")
    if machine_type == "OT-2 Standard":
        return OT2SimulatorSetup(
            **{k: _prepare_for_simulator_setup(k, v) for (k, v) in obj.items()}
        )
    else:
        return OT3SimulatorSetup(
            **{k: _prepare_for_ot3_simulator_setup(k, v) for (k, v) in obj.items()}
        )