To find the package related nodes, I need to find which nodes correspond to incorporating external libraries in the code. I will look at the higher level nodes. Hence, I can see that the 'import_from_statement' nodes with ids = [1, 8], represent importing packages in the code. Incorporating each of these nodes, I can make a general rule to extract the package(s).
This python script can be executed:

```py
# as every node has the keyword 'from' and the package is present after that, we take the scippet after the keyword
text = code_snippet.split('from', 1)[1].strip()
# get the text before the keyword 'import'
text = text.split('import')[0].strip()
# if it has sub packages, take only the top nodes
if ('.' in text) :
    # taking only the top level package
    extracted = text.split('.')[0]
# else, it is just the package itself
else:
    # return the package
    extracted = text
```