def _get_hash_function(self):
        """
        Return instantiated hash function for the hash type supported by
        the provider.
        """
        try:
            func = getattr(hashlib, self.hash_type)()
        except __HOLE__:
            raise RuntimeError('Invalid or unsupported hash type: %s' %
                               (self.hash_type))

        return func
dataset/ETHPy150Open apache/libcloud/libcloud/storage/base.py/StorageDriver._get_hash_function