code: def test_choose():
      with option_context() as options:
          options.chunk_size = 2
  
          choices = [
              [0, 1, 2, 3],
              [10, 11, 12, 13],
              [20, 21, 22, 23],
              [30, 31, 32, 33],
          ]
          a = choose([2, 3, 1, 0], choices)
  
          a = tile(a)
          assert len(a.chunks) == 2
          assert isinstance(a.chunks[0].op, type(a.op))
          assert len(a.chunks[0].inputs) == 5
  
          with pytest.raises(TypeError):
              choose([2, 3, 1, 0], choices, out=1)
  
          with pytest.raises(ValueError):
              choose(
                  [2, 3, 1, 0], choices, out=tensor(np.empty((1, 4)))
              )
  
imports: import numpy
  import pytest
  from ....config import option_context
  from ....core import tile
  from ...base.broadcast_to import TensorBroadcastTo
  from ...datasource import ones, tensor, array, empty
  from ...datasource.ones import TensorOnes
  from ...merge.concatenate import TensorConcatenate
  from ..None import choose, unravel_index, nonzero, compress, fill_diagonal
  from ..setitem import TensorIndexSetValue
label_desc: Use image node_id 11 for calling a global function with example usage: test_choose() without return types