code: def test_pydotprint_return_image():
      # Skip test if pydot is not available.
      if not theano.printing.pydot_imported:
          raise SkipTest("pydot not available")
  
      x = tensor.dvector()
      ret = theano.printing.pydotprint(x * 2, return_image=True)
      assert isinstance(ret, (str, bytes))
  
imports: from __future__ import absolute_import, print_function, division
  import logging
  from nose.plugins.skip import SkipTest
  import numpy
  from six.moves import StringIO
  import theano
  import theano.tensor
  from theano.printing import min_informative_str, debugprint
label_desc: Use image node_id 2 for calling a global function with example usage: test_pydotprint_return_image() without return types