async def METHOD_NAME(
    cls, configuration: SessionConfiguration, instance_meta: SessionMetaData
) -> "BaseSession":
    # if lights are on already it's because the user clicked the button,
    # so a) we don't need to turn them on now and b) we shouldn't turn them
    # off after
    session_controls_lights = not (await configuration.hardware.get_lights())[
        "rails"
    ]
    await configuration.hardware.cache_instruments()
    try:
        deck_cal_user_flow = DeckCalibrationUserFlow(
            hardware=configuration.hardware
        )
    except AssertionError as e:
        raise SessionCreationException(str(e))
    if session_controls_lights:
        await configuration.hardware.set_lights(rails=True)
        shutdown_handler: Optional[
            Awaitable[None]
        ] = configuration.hardware.set_lights(rails=False)
    else:
        shutdown_handler = None
    return cls(
        configuration=configuration,
        instance_meta=instance_meta,
        deck_cal_user_flow=deck_cal_user_flow,
        shutdown_handler=shutdown_handler,
    )