code: def promote_type(orig_type, new_type):
          
  
          if not new_type:
              return orig_type
  
          if not orig_type:
              return new_type
  
          try:
              orig_type = orig_type.__name__
          except AttributeError:
              pass
  
          try:
              new_type = new_type.__name__
          except AttributeError:
              pass
  
          type_precidence = ['unknown', 'int', 'float', 'date', 'time', 'datetime', 'str', 'bytes', 'unicode']
  
          # TODO This will fail for dates and times.
  
          if type_precidence.index(new_type) > type_precidence.index(orig_type):
              return new_type
          else:
              return orig_type
docs: Given a table with an original type, decide whether a new determination of a new applicable type
          should overide the existing one