def setupRetrieveHLTModeMock(hltMode, mocker):
    """ Helper function to mock the HLT mode which is extracted for a run.

    This is all just for convenience so we don't have to create the run information files.

    Args:
        hltMode (str): A valid HLT mode.
        mocker (mocker): The mock object from ``pytest-mock`` to be used in mocking the object.
    Returns:
        MagicMock: The HLT mode mock.
    """
    # Mock retrieving the HLT mode for implicitly
    mHLTMode = mocker.MagicMock(return_value = hltMode)
    mocker.patch("overwatch.base.utilities.retrieveHLTModeFromStoredRunInfo", mHLTMode)
    return mHLTMode