Methods of sample line groups and sample lines

You can use dynamo SL or SLG nodes as input, then you can access the InternalObjectId and you have to open the object using that id.
Code examples:
Sample line group input:

Get group using sample line: