Carbon nanotubes terminated with hard magnetic FePt nanomagnets