def setup(self):
        if self.secret_pass_phrase is None:
            self.secret_pass_phrase = Random.new().read(512)

        d = CryptStreamCreator.setup(self)

        def make_stream_hash():
            hashsum = get_lbry_hash_obj()
            hashsum.update(binascii.hexlify(self.name))
            hashsum.update(get_pub_key(self.secret_pass_phrase))
            hashsum.update(binascii.hexlify(self.key))
            self.stream_hash = hashsum.hexdigest()
            return self.stream_hash

        d.addCallback(lambda _: make_stream_hash())
        d.addCallback(lambda _: self._save_stream())
        d.addCallback(lambda _: self.stream_hash)
        return d
imits object holds instance limits for convenience.
dataset/ETHPy150Open lbryio/lbry/lbrynet/lbrylive/LiveStreamCreator.py/LiveStreamCreator.setup--crossover with--dataset/ETHPy150Open openstack/nova/nova/virt/vmwareapi/vm_util.py/Limits.__init__