code: def _get_output(output, input, shape=None):
      if shape is None:
          shape = input.shape
      if output is None:
          output = numpy.zeros(shape, dtype=input.dtype.name)
      elif type(output) in [type(type), type(numpy.zeros((4,)).dtype)]:
          output = numpy.zeros(shape, dtype=output)
      elif isinstance(output, string_types):
          output = numpy.typeDict[output]
          output = numpy.zeros(shape, dtype=output)
      elif output.shape != shape:
          raise RuntimeError("output shape not correct")
      return output
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from scipy._lib.six import string_types
label_desc: Use image node_id 3 for calling a global function with example usage: _get_output(output, input, shape) and returns: output