code: def test_get_image_size(self):
      # Test we can infer the size and channel dimension of an image.
      image = np.random.randint(0, 256, (32, 64, 3))
      self.assertEqual(get_image_size(image), (32, 64))
  
      image = np.random.randint(0, 256, (3, 32, 64))
      self.assertEqual(get_image_size(image), (32, 64))
  
      # Test the channel dimension can be overriden
      image = np.random.randint(0, 256, (3, 32, 64))
      self.assertEqual(
          get_image_size(image, channel_dim=ChannelDimension.LAST),
          (3, 32),
      )
  
imports: import unittest
  import datasets
  import numpy
  import pytest
  from transformers import is_torch_available, is_vision_available
  from transformers.image_utils import ChannelDimension, get_channel_dimension_axis
  from transformers.testing_utils import require_torch, require_vision
label_desc: Use image node_id 1 for calling the UtilFunctionTester obj's underlying member method code with example usage: obj.test_get_image_size() without return types