code: def feature_union_concat(Xs, nsamples, weights):
      
      if any(x is FIT_FAILURE for x in Xs):
          return FIT_FAILURE
      Xs = [X if w is None else X * w for X, w in zip(Xs, weights) if X is not None]
      if not Xs:
          return np.zeros((nsamples, 0))
      if any(sparse.issparse(f) for f in Xs):
          return sparse.hstack(Xs).tocsr()
      return np.hstack(Xs)
docs: Apply weights and concatenate outputs from a FeatureUnion