def METHOD_NAME(f_mixed, const, idx):
    const.assign(10.0)
    domain = "{[i]: 0 <= i < d.dofs}"
    instructions = """
    for i
        d[i, 0] = constant[0]
    end
    """
    par_loop((domain, instructions), dx, {'d': (f_mixed[idx], WRITE), 'constant': (const, READ)})
    assert np.allclose(f_mixed.dat[idx].data, const.dat.data)