def _read_data(self, dataset, format=None):
        # Attempt to detect file format if "format" isn't specified
        if not format:
            format_class = formats.detect(dataset)
            if not format_class:
                raise FormatError('Could not automatically detect format for the given '
                                  'data source.')
        else:
            registry = formats.get_registry()
            if format not in registry.keys():
                raise ValueError("'{0}' format not supported.".format(format))
            format_class = registry[format]
        return format_class(dataset, **self.format_kwargs).to_iterable()
Setup gateway instance
dataset/ETHPy150Open sloria/TextBlob/textblob/classifiers.py/BaseClassifier._read_data--crossover with--dataset/ETHPy150Open openstack/storlets/Engine/swift/storlet_middleware/storlet_handler.py/BaseStorletHandler._setup_gateway