def _set_bucket(self, type, name):
if type:<EOL><INDENT>self._cfg['<STR_LIT>'] = type<EOL><DEDENT>if name:<EOL><INDENT>self._cfg['<STR_LIT>'] = name<EOL><DEDENT>self.bucket = self._client.bucket_type(self._cfg['<STR_LIT>']<EOL>).bucket(self._cfg['<STR_LIT>'])<EOL>self.index_name = "<STR_LIT>" % (self._cfg['<STR_LIT>'], self._cfg['<STR_LIT>'])<EOL>return self<EOL>
prepares bucket, sets index name
:param str type: bucket type
:param str name: bucket name
:return: