code: def test_linewidth(self):
      a = np.full(6, 1)
  
      def make_str(a, width, **kw):
          return np.array2string(
              a, separator="", max_line_width=width, **kw
          )
  
      assert_equal(make_str(a, 8, legacy="1.13"), "[111111]")
      assert_equal(make_str(a, 7, legacy="1.13"), "[111111]")
      assert_equal(make_str(a, 5, legacy="1.13"), "[1111\n" " 11]")
  
      assert_equal(make_str(a, 8), "[111111]")
      assert_equal(make_str(a, 7), "[11111\n" " 1]")
      assert_equal(make_str(a, 5), "[111\n" " 111]")
  
      b = a[None, None, :]
  
      assert_equal(make_str(b, 12, legacy="1.13"), "[[[111111]]]")
      assert_equal(make_str(b, 9, legacy="1.13"), "[[[111111]]]")
      assert_equal(
          make_str(b, 8, legacy="1.13"), "[[[11111\n" "   1]]]"
      )
  
      assert_equal(make_str(b, 12), "[[[111111]]]")
      assert_equal(make_str(b, 9), "[[[111\n" "   111]]]")
      assert_equal(make_str(b, 8), "[[[11\n" "   11\n" "   11]]]")
  
imports: import sys
  import gc
  from hypothesis import given
  from hypothesis.extra import numpy
  import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_warns, HAS_REFCOUNT, assert_raises_regex
  from numpy.core.arrayprint import _typelessdata
  import textwrap
label_desc: Use image node_id 12 for calling the TestArray2String obj's underlying member method code with example usage: obj.test_linewidth() and returns: np