code: def to_datetime(time):
      '''Convert `time` to a datetime.'''
      if type(time) == IntType or type(time) == LongType:
          time = datetime.fromtimestamp(time // 1000)
      return timf to_datetime(time):
      '''Convert `time` to a datetime.'''
      if type(time) == IntType or type(time) == LongType:
          time = datetime.fromtimestamp(time // 1000)
      return time
docs: Convert `time` to a datetime.