def _get_baseline_from_tag(config, tag):
 last_snapshot = None
 for snapshot in __salt__['snapper.list_snapshots'](config):
  if (tag == snapshot['userdata'].get('baseline_tag')):
   if ((not last_snapshot) or (last_snapshot['timestamp'] < snapshot['timestamp'])):
    last_snapshot = snapshot
 return last_snapshot

def _get_baseline_from_tag ( config , tag ) : last_snapshot = None for snapshot in __salt__ [ 'snapper.list_snapshots' ] ( config ) : if ( tag == snapshot [ 'userdata' ] . get ( 'baseline_tag' ) ) : if ( ( not last_snapshot ) or ( last_snapshot [ 'timestamp' ] < snapshot [ 'timestamp' ] ) ) : last_snapshot = snapshot return last_snapshot
returns the last created baseline snapshot marked with tag .