code: def test_build_shards():
      array = np.array([1, 2, 3, 4])
      shards = _build_shards(4, array)
      assert shards == [
          np.array([1]),
          np.array([2]),
          np.array([3]),
          np.array([4]),
      ]
  
      shards = _build_shards(3, array)
      for out, expected in zip(
          shards, map(np.array, [[1], [2], [3, 4]])
      ):
          assert np.array_equal(out, expected)
  
      with pytest.raises(ValueError):
          shards = _build_shards(5, array)
  
imports: from __future__ import absolute_import
  import numpy
  import pytest
  from mock import ANY, Mock, patch, call
  from sagemaker import image_uris
  from sagemaker.amazon.pca import PCA
  from sagemaker.amazon.amazon_estimator import upload_numpy_to_s3_shards, _build_shards, FileSystemRecordSet
  from sagemaker.session_settings import SessionSettings
  from tests.unit import DEFAULT_S3_OBJECT_KEY_PREFIX_NAME, DEFAULT_S3_BUCKET_NAME, _test_default_bucket_and_prefix_combinations
label_desc: Use image node_id 15 for calling a global function with example usage: test_build_shards() without return types