public <T> List<T> map(ManageablePortfolioNode node, Function<T> function) {
List<T> results = Lists.newArrayList();
for (ObjectId positionId : node.getPositionIds()) {
ManageablePosition position = _positionMaster.get(positionId, _versionCorrection).getPosition();
if (position == null) {
throw new DataNotFoundException("No position found with ID " + positionId + " and " +
"version-correction " + _versionCorrection);
}
ManageableSecurity security = (ManageableSecurity) position.getSecurityLink().resolve(_securitySource);
ExternalId underlyingId = FinancialSecurityUtils.getUnderlyingId(security);
ManageableSecurity underlying;