def METHOD_NAME(random_data, mock_remote_api):
    """perform fitting on random data"""
    # wrong input data
    with pytest.raises(pydantic.ValidationError):
        fitter = DispersionFitter(wvl_um=[], n_data=())
    with pytest.raises(pydantic.ValidationError):
        fitter = DispersionFitter(wvl_um=[1.0], n_data=(1.0, 1.1))
    with pytest.raises(pydantic.ValidationError):
        fitter = DispersionFitter(wvl_um=[1.0], n_data=(1.0), k_data=(0, 1))
    with pytest.raises(SetupError):
        fitter = DispersionFitter(wvl_um=[1.0], n_data=(1.0), wvl_range=(2, 3))
        medium, rms = fitter.fit(num_tries=2)
    wvl_um, n_data, _ = random_data
    fitter = DispersionFitter(wvl_um=wvl_um.tolist(), n_data=tuple(n_data))
    medium, rms = fitter._fit_single()
    medium, rms = fitter.fit(num_tries=2)
    medium, rms = run_fitter(fitter)
    fitter = FastDispersionFitter(wvl_um=wvl_um.tolist(), n_data=tuple(n_data))
    medium, rms = fitter.fit(advanced_param=advanced_param)