class_docstr: Tests jit targeting to different backends.
class_docstr_tok: ["Tests","jit","targeting","to","different","backends","."]
code: def test_sum(self):
      # https://github.com/google/jax/issues/2905
      cpus = jax.devices("cpu")
  
      x = jax.device_put(np.ones(2), cpus[0])
      y = x.sum()
      self.assertEqual(y.devices(), {cpus[0]})
  
file_path: jax/tests/multibackend_test.py
imports: from functools import partial
  from absl.testing import absltest
  import numpy
  import numpy.random
  from unittest import SkipTest
  import jax
  from jax._src import test_util
  from jax import numpy
  from jax import config
label_desc: Use image node_id 9 for calling the MultiBackendTest obj's underlying member method code with example usage: obj.test_sum() without return types