code: def _more_generic(type1, type2):
      types = {
          _none_type: 0,
          int: 1,
          float: 2,
          _binary_type: 3,
          _text_type: 4,
      }
      invtypes = {
          4: _text_type,
          3: _binary_type,
          2: float,
          1: int,
          0: _none_type,
      }
      moregeneric = max(types.get(type1, 4), types.get(type2, 4))
      return invtypes[moregeneric]
  
imports: from __future__ import print_function
  from __future__ import unicode_literals
  from collections import namedtuple
  from platform import python_version_tuple
  import re
label_desc: Use image node_id 17 for calling a global function with example usage: _more_generic(type1, type2) and returns: invtypes