code: def _types_match(type1, type2):
          
          if isinstance(type1, six.string_types) and \
                  isinstance(type2, six.string_types):
              type1 = type1.rstrip('?')
              type2 = type2.rstrip('?')
              if type1 != type2:
                  return False
  
          return True
docs: Returns False only if it can show that no value of type1
          can possibly match type2.
  
          Supports only a limited selection of types.