code: def test_single_record_strategy_with_large_records():
      splitter = Mock()
      mb = 1024 * 1024
  
      single_record = sagemaker.local.data.SingleRecordStrategy(
          splitter
      )
      # We will construct a huge record greater than 1MB and we expect an exception
      # since there is no way to fit this with the payload size.
      buffer = ""
      while sys.getsizeof(buffer) < 2 * mb:
          buffer += "1" * 100
  
      data = [buffer]
      with pytest.raises(RuntimeError):
          splitter.split.return_value = data
          batch_records = [r for r in single_record.pad("some_file", 1)]
          print(batch_records)
  
imports: from __future__ import absolute_import
  import sys
  import pytest
  from mock import patch, Mock
  import sagemaker.amazon
  import sagemaker.local.data
label_desc: Use image node_id 15 for calling a global function with example usage: test_single_record_strategy_with_large_records() without return types