code: def _find_tide_info(predictions):
      
  
      last_prediction = None
      first_high_tide = None
      second_high_tide = None
      low_tide = None
      first_tide_done = False
      for prediction in predictions:
          if last_prediction is None:
              last_prediction = prediction
              continue
          if last_prediction['v'] < prediction['v']:
              if not first_tide_done:
                  first_high_tide = prediction
              else:
                  second_high_tide = prediction
          else:  # we're decreasing
              if not first_tide_done and first_high_tide is not None:
                  first_tide_done = True
              elif second_high_tide is not None:
                  break  # we're decreasing after having found the 2nd tide. We're done.
              if first_tide_done:
                  low_tide = prediction
          last_prediction = prediction
  
      fmt = '%Y-%m-%d %H:%M'
      parse = datetime.datetime.strptime
      tideinfo = TideInfo()
      tideinfo.first_high_tide_time = parse(first_high_tide['t'], fmt)
      tideinfo.first_high_tide_height = float(first_high_tide['v'])
      tideinfo.second_high_tide_time = parse(second_high_tide['t'], fmt)
      tideinfo.second_high_tide_height = float(second_high_tide['v'])
      tideinfo.low_tide_time = parse(low_tide['t'], fmt)
      tideinfo.low_tide_height = float(low_tide['v'])
      return tideinfo
docs: Algorithm to find the 2 high tides for the day, the first of which is smaller and occurs
       mid-day, the second of which is larger and typically in the evening.