code: def _get_spot_history(ctx, instance_type):
      
  
      one_week_ago = datetime.datetime.now() - datetime.timedelta(days=7)
      spot_data = ctx.ec2.get_spot_price_history(start_time=one_week_ago.isoformat(),
                                                 instance_type=instance_type,
                                                 product_description="Linux/UNIX")
      spot_data.sort(key=attrgetter("timestamp"), reverse=True)
      return spot_data
docs: Returns list of 1,000 most recent spot market data points represented as SpotPriceHistory
      objects. Note: The most recent object/data point will be first in the list.
  
      :rtype: list[SpotPriceHistory]