def METHOD_NAME(create_basic_job_with_data_sets):
    """
    we query the loaded datasets of fr
    we loaded 2 datasets, one for pt, one for synonym
    """
    resp = api_get('/v0/instances/fr/last_datasets')
    assert len(resp) == 2
    fusio = next((d for d in resp if d['type'] == 'fusio'), None)
    assert fusio
    assert fusio['family_type'] == 'pt'
    assert fusio['name'] == '/path/to/dataset_0'
    synonym = next((d for d in resp if d['type'] == 'synonym'), None)
    assert synonym
    assert synonym['family_type'] == 'synonym'
    assert synonym['name'] == '/path/to/dataset_1'
    # There is only one job
    resp = api_get('/v0/jobs/fr')
    assert len(resp['jobs']) == 1
    # Here we add a new job with mimir as data_set
    add_job_with_data_set_mimir(create_basic_job_with_data_sets)
    resp = api_get('/v0/instances/fr/last_datasets')
    assert len(resp) == 2
    assert resp[0]['family_type'] == 'pt'
    assert resp[0]['name'] == '/path/to/dataset_0'
    assert resp[1]['family_type'] == 'synonym'
    assert resp[1]['name'] == '/path/to/dataset_1'
    # we have two jobs: one with 1 data_set and another with 2 data_sets
    resp = api_get('/v0/jobs/fr')
    assert len(resp['jobs']) == 2
    job_with_pt = resp['jobs'][1]['data_sets']
    assert job_with_pt[0]['family_type'] == 'pt'
    assert job_with_pt[0]['name'] == '/path/to/dataset_0'
    assert job_with_pt[0]['type'] == 'fusio'
    assert job_with_pt[1]['family_type'] == 'synonym'
    assert job_with_pt[1]['name'] == '/path/to/dataset_1'
    assert job_with_pt[1]['type'] == 'synonym'
    job_with_mimir = resp['jobs'][0]['data_sets']
    assert job_with_mimir[0]['family_type'] == 'mimir'
    assert job_with_mimir[0]['name'] == '/path/to/dataset_3'
    assert job_with_mimir[0]['type'] == 'stop2mimir'
    # We add one job and a data_set with job state = 'running'.
    add_job_and_data_set_with_jobstate_running(create_basic_job_with_data_sets)
    # Here we should have the same data_sets as before since the new job added has state 'running'
    resp = api_get('/v0/instances/fr/last_datasets')
    assert len(resp) == 2
    assert resp[0]['family_type'] == 'pt'
    assert resp[0]['name'] == '/path/to/dataset_0'
    assert resp[1]['family_type'] == 'synonym'
    assert resp[1]['name'] == '/path/to/dataset_1'
    # Here we should have the same data_sets as before since the new job added has state 'running'
    resp = api_get('/v0/jobs/fr')
    assert len(resp['jobs']) == 3