def _pull_from_stream(self, amount_requested):
        stream_filein = sys.stdin
        if six.PY3:
            stream_filein = sys.stdin.buffer
        payload = stream_filein.read(amount_requested)
        payload_file = six.BytesIO(payload)
        return payload_file, len(payload) == amount_requested
{% resource_calendar_events 'id' 'start_date' 'end_date' as events %}
dataset/ETHPy150Open aws/aws-cli/awscli/customizations/s3/s3handler.py/S3StreamHandler._pull_from_stream--crossover with--dataset/ETHPy150Open zorna/zorna/zorna/calendars/templatetags/calendars_tags.py/calendar_events_for_object