Convert Node To Array Python Size Function In R