You could prefix the call to your custom generating command like this:
| stats count | addinfo | your_command
That way you should get info about the time range as input events for your command.
I don't think there's an intended way for accessing this directly - any more. Taken from the doc of splunk.Intersplunk:
Converts an Intersplunk-formatted file object into a dict
representation of the contained events, and returns a tuple of:
(results, dummyresults, settings)
"dummyresults" is always an empty list, and "settings" is always
an empty dict, since the change to csv stopped sending the
searchinfo. It has not been updated to store the auth token.
My guess is you're looking for what used to be in searchinfo.