Use script from project library in report datasource

Here's a script which can be used to determine the scope. In cases where a library script may be called from multiple scopes.