code: def test_narrow_code_storage(self):
      create_categories = self.create_categories
      check_roundtrip = self.check_roundtrip
  
      # uint8
      categories = create_categories(8, plus_one=False)
      arr = LabelArray(
          [],
          missing_value=categories[0],
          categories=categories,
      )
      self.assertEqual(arr.itemsize, 1)
      check_roundtrip(arr)
  
      # uint8 inference
      arr = LabelArray(categories, missing_value=categories[0])
      self.assertEqual(arr.itemsize, 1)
      check_roundtrip(arr)
  
      # just over uint8
      categories = create_categories(8, plus_one=True)
      arr = LabelArray(
          [],
          missing_value=categories[0],
          categories=categories,
      )
      self.assertEqual(arr.itemsize, 2)
      check_roundtrip(arr)
  
      # fits in uint16
      categories = create_categories(16, plus_one=False)
      arr = LabelArray(
          [],
          missing_value=categories[0],
          categories=categories,
      )
      self.assertEqual(arr.itemsize, 2)
      check_roundtrip(arr)
  
      # uint16 inference
      arr = LabelArray(categories, missing_value=categories[0])
      self.assertEqual(arr.itemsize, 2)
      check_roundtrip(arr)
  
      # just over uint16
      categories = create_categories(16, plus_one=True)
      arr = LabelArray(
          [],
          missing_value=categories[0],
          categories=categories,
      )
      self.assertEqual(arr.itemsize, 4)
      check_roundtrip(arr)
  
      # uint32 inference
      arr = LabelArray(categories, missing_value=categories[0])
      self.assertEqual(arr.itemsize, 4)
      check_roundtrip(arr)
  
imports: from itertools import product
  from operator import eq, ne
  import warnings
  import numpy
  from toolz import take
  from catalyst.lib.labelarray import LabelArray
  from catalyst.testing import check_arrays, parameter_space, CatalystTestCase
  from catalyst.testing.predicates import assert_equal
  from catalyst.utils.compat import unicode
label_desc: Use image node_id 16 for calling the LabelArrayTestCase obj's underlying member method code with example usage: obj.test_narrow_code_storage() without return types