code: def test_nd_array_narrow_errors(self, ctx_name):
      self.try_to_set_ctx(ctx_name)
  
      with pytest.raises(RuntimeError):
          # Failed `length >= 0`: negative number for `length` (-5) is not permitted
          a = nn.NdArray((10, 5))
          _ = a.narrow(0, 2, -5)
      with pytest.raises(RuntimeError):
          # Failed `length >= 0 && start + length <= size`: start (2) + length (50) exceeds dimension size (10)
          a = nn.NdArray((10, 5))
          _ = a.narrow(0, 2, 50)
      with pytest.raises(RuntimeError):
          # Failed `dim == 0`: `dim` is out of range (expected to be 0, but got 1)
          a = nn.NdArray((10, 5))
          _ = a.narrow(1, 2, 5)
      with pytest.raises(RuntimeError):
          # Failed `start0 >= -size && start0 < size`: `start0` is out of range (expected to be [-10, 9], but got -11)
          a = nn.NdArray((10, 5))
          _ = a.narrow(0, -11, 5)
  
      # Failed if overlapped area.
      a = nn.NdArray(10)
      b = a.narrow(0, 2, 2)
      with pytest.raises(RuntimeError):
          d = a.narrow(0, 0, 3)
      with pytest.raises(RuntimeError):
          d = a.narrow(0, 2, 2)
      with pytest.raises(RuntimeError):
          d = a.narrow(0, 3, 2)
  
imports: import numpy
  import nnabla
  import pytest
  from nnabla.ext_utils import get_extension_context
  import nnabla.functions
label_desc: Use image node_id 11 for calling the TestNdArrayNarrow obj's underlying member method code with example usage: obj.test_nd_array_narrow_errors(ctx_name) without return types