code: def get_hex(self, signed=True):
          
          total_ins_satoshi = self.total_input_satoshis()
          if total_ins_satoshi == 0:
              raise ValueError("Can't make transaction, there are zero inputs")
  
          # Note: there can be zero outs (sweep or coalesc transactions)
          total_outs_satoshi = sum([x['value'] for x in self.outs])
  
          if not self.fee_satoshi:
              self.fee() # use default of $0.02
  
          change_satoshi = total_ins_satoshi - (total_outs_satoshi + self.fee_satoshi)
  
          if change_satoshi < 0:
              raise ValueError(
                  "Input amount (%s) must be more than all output amounts (%s) plus fees (%s). You need more %s."
                  % (total_ins_satoshi, total_outs_satoshi, self.fee_satoshi, self.crypto.upper())
              )
  
          ins = [x['input'] for x in self.ins]
  
          if change_satoshi > 0:
              if self.verbose:
                  print("Adding change address of %s satoshis to %s" % (change_satoshi, self.change_address))
              change = [{'value': change_satoshi, 'address': self.change_address}]
          else:
              change = [] # no change ?!
              if self.verbose: print("Inputs == Outputs, no change address needed.")
  
          tx = mktx(ins, self.outs + change)
  
          if signed:
              for i, input_data in enumerate(self.ins):
                  if not input_data['private_key']:
                      raise Exception("Can't sign transaction, missing private key for input %s" % i)
                  tx = sign(tx, i, input_data['private_key'])
  
          return tx
docs: Given all the data the user has given so far, make the hex using pybitcointools