code: def test_array_from_file_overflow():
      # Test for int overflow in size calculation in array_from_file
      shape = (1500,) * 6
  
      class NoStringIO:  # Null file-like for forcing error
          def seek(self, n_bytes):
              pass
  
          def read(self, n_bytes):
              return b""
  
      try:
          array_from_file(shape, np.int8, NoStringIO())
      except OSError as err:
          message = str(err)
      assert message == (
          "Expected 11390625000000000000 bytes, got 0 bytes from object\n"
          " - could the file be damaged?"
      )
  
imports: import bz2
  import functools
  import gzip
  import itertools
  import os
  import tempfile
  import threading
  import time
  import warnings
  from io import BytesIO
  from os.path import exists
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from packaging.version import Version
  from nibabel.testing import assert_allclose_safely, assert_dt_equal, error_warnings, suppress_warnings
  from ..casting import OK_FLOATS, floor_log2, sctypes, shared_range, type_info
  from ..openers import BZ2File, ImageOpener, Opener
  from ..optpkg import optional_package
  from ..tmpdirs import InTemporaryDirectory
  from ..volumeutils import _dt_min_max, _ftype4scaled_finite, _is_compressed_fobj, _write_data, apply_read_scaling, array_from_file, array_to_file, best_write_scale_ftype, better_float_of, fname_ext_ul_case, int_scinter_ftype, make_dt_codes, native_code, rec2dict, seek_tell, shape_zoom_affine, working_type, write_zeros
label_desc: Use image node_id 41 for calling a global function with example usage: test_array_from_file_overflow() and returns: bytes