def load_stream(filename):
    """Load a file stream from the package resources."""
    rawfile = pkg_resources.resource_stream(__name__, filename)
    if six.PY2:
        return rawfile
    return io.TextIOWrapper(rawfile, 'utf-8')
Load a file stream from the package resources.