def METHOD_NAME(ds, module_registry):
    ds0 = module_registry.K * ds.isel(x=0)
    ds1 = (ds * module_registry.K).isel(x=0)
    xr.testing.assert_identical(ds0, ds1)
    assert np.isclose(ds0["a"].mean().item(), 0.5 * module_registry.K)