code: def get_ddlib_feats(span, context, idxs):
      
  
      if span.stable_id not in unary_ddlib_feats:
          unary_ddlib_feats[span.stable_id] = set()
  
          for seq_feat in _get_seq_features(context, idxs):
              unary_ddlib_feats[span.stable_id].add(seq_feat)
  
          for window_feat in _get_window_features(context, idxs):
              unary_ddlib_feats[span.stable_id].add(window_feat)
  
      for f in unary_ddlib_feats[span.stable_id]:
          yield f
docs: Minimalist port of generic mention features from ddlib