code: def sign(self, tx=None, wifs=[]):
          
          if tx:
              txbuffer = self.transactionbuilder_class(tx, blockchain_instance=self)
          else:
              txbuffer = self.txbuffer
          txbuffer.appendWif(wifs)
          txbuffer.appendMissingSignatures()
          txbuffer.sign()
          return txbuffer.json()
docs: Sign a provided transaction witht he provided key(s)
  
              :param dict tx: The transaction to be signed and returned
              :param string wifs: One or many wif keys to use for signing
                  a transaction. If not present, the keys will be loaded
                  from the wallet as defined in "missing_signatures" key
                  of the transactions.