code: def test_info_method_heading():
      # info(class) should only print "Methods:" heading if methods exist
  
      class NoPublicMethods:
          pass
  
      class WithPublicMethods:
          def first_method():
              pass
  
      def _has_method_heading(cls):
          out = StringIO()
          utils.info(cls, output=out)
          return "Methods:" in out.getvalue()
  
      assert _has_method_heading(WithPublicMethods)
      assert not _has_method_heading(NoPublicMethods)
  
imports: import inspect
  import sys
  import pytest
  import numpy
  from numpy.core import arange
  from numpy.testing import assert_, assert_equal, assert_raises_regex
  from numpy.lib import deprecate, deprecate_with_doc
  import numpy.lib.utils
  from io import StringIO
label_desc: Use image node_id 19 for calling a global function with example usage: test_info_method_heading() and returns: unknown