code: def test_malformed1():
      # Example from gh-6072
      # Contains malformed header data, which previously resulted into a
      # buffer overflow.
      #
      # Should raise an exception, not segfault
      fname = pjoin(TEST_DATA_PATH, "malformed1.mat")
      with open(fname, "rb") as f:
          assert_raises(ValueError, loadmat, f)
  
imports: from os.path import dirname, join
  from numpy.testing import assert_
  from pytest import raises
  from scipy.io.matlab._mio import loadmat
label_desc: Use image node_id 2 for calling a global function with example usage: test_malformed1() without return types