code: def safe_spanning_type(types, might_overflow, pos, scope):
      result_type = simply_type(reduce(find_spanning_type, types), pos)
      if result_type.is_pyobject:
          # In theory, any specific Python type is always safe to
          # infer. However, inferring str can cause some existing code
          # to break, since we are also now much more strict about
          # coercion from str to char *. See trac #553.
          if result_type.name == "str":
              return py_object_type
          else:
              return result_type
      elif result_type is PyrexTypes.c_double_type:
          # Python's float type is just a C double, so it's safe to use
          # the C type instead
          return result_type
      elif result_type is PyrexTypes.c_bint_type:
          # find_spanning_type() only returns 'bint' for clean boolean
          # operations without other int types, so this is safe, too
          return result_type
      elif result_type.is_pythran_expr:
          return result_type
      elif result_type.is_ptr:
          # Any pointer except (signed|unsigned|) char* can't implicitly
          # become a PyObject, and inferring char* is now accepted, too.
          return result_type
      elif result_type.is_cpp_class:
          # These can't implicitly become Python objects either.
          return result_type
      elif result_type.is_struct:
          # Though we have struct -> object for some structs, this is uncommonly
          # used, won't arise in pure Python, and there shouldn't be side
          # effects, so I'm declaring this safe.
          return result_type
      # TODO: double complex should be OK as well, but we need
      # to make sure everything is supported.
      elif (
          result_type.is_int or result_type.is_enum
      ) and not might_overflow:
          return result_type
      elif (
          not result_type.can_coerce_to_pyobject(scope)
          and not result_type.is_error
      ):
          return result_type
      return py_object_type
  
imports: from __future__ import absolute_import
  from .Errors import error, message
  from .None import ExprNodes
  from .None import Nodes
  from .None import Builtin
  from .None import PyrexTypes
  from ..None import Utils
  from .PyrexTypes import py_object_type, unspecified_type
  from .Visitor import CythonTransform, EnvTransform
label_desc: Use image node_id 4 for calling a global function with example usage: safe_spanning_type(types, might_overflow, pos, scope) and returns: py_object_type, py_object_type, result_type, result_type, result_type, result_type, result_type, result_type, result_type, result_type, result_type