nodes function

Returns a list with the names of the nodes of a BN or a DBN