def METHOD_NAME(tmp_path, module, compressor, store_type):
    xp = ensure_module(module)
    store = init_store(tmp_path / "from_cupy_array", store_type)
    a = xp.arange(100)
    z = array(a, chunks=10, compressor=compressor, store=store, meta_array=xp.empty(()))
    assert a.shape == z.shape
    assert a.dtype == z.dtype
    assert isinstance(a, type(z[:]))
    assert isinstance(z.meta_array, type(xp.empty(())))
    xp.testing.assert_array_equal(a, z[:])
    # with array-like
    store = init_store(tmp_path / "from_list", store_type)
    a = list(range(100))
    z = array(a, chunks=10, compressor=compressor, store=store, meta_array=xp.empty(()))
    assert (100,) == z.shape
    assert np.asarray(a).dtype == z.dtype
    xp.testing.assert_array_equal(a, z[:])
    # with another zarr array
    store = init_store(tmp_path / "from_another_store", store_type)
    z2 = array(z, compressor=compressor, store=store, meta_array=xp.empty(()))
    assert z.shape == z2.shape
    assert z.chunks == z2.chunks
    assert z.dtype == z2.dtype
    xp.testing.assert_array_equal(z[:], z2[:])
    store = init_store(tmp_path / "open_array", store_type)
    a = xp.arange(100)
    z = open_array(
        store,
        shape=a.shape,
        dtype=a.dtype,
        chunks=10,
        compressor=compressor,
        meta_array=xp.empty(()),
    )
    z[:] = a
    assert a.shape == z.shape
    assert a.dtype == z.dtype
    assert isinstance(a, type(z[:]))
    assert isinstance(z.meta_array, type(xp.empty(())))
    xp.testing.assert_array_equal(a, z[:])