def METHOD_NAME(feats):
    # recursively traverse feats until it's a tensor,
    # then concat
    out_feats = []
    for e_idx, elem in enumerate(feats[0]):
        batch_elem = [feat[e_idx] for feat in feats]
        if not isinstance(elem, torch.Tensor):
            batch_elem = METHOD_NAME(batch_elem)
        else:
            batch_elem = torch.cat(batch_elem)
        out_feats.append(batch_elem)
    return tuple(out_feats)