docs: def get_unspents(address, blockchain_client=BlockchainInfoClient()):
      """ Get the spendable transaction outputs, also known as UTXOs or
          unspent transaction outputs.
      """
      if not isinstance(blockchain_client, BlockchainInfoClient):
          raise Exception('A BlockchainInfoClient object is required')
  
      url = BLOCKCHAIN_API_BASE_URL + "/unspent?format=json&active=" + address
  
      auth = blockchain_client.auth
      if auth and len(auth) == 2 and isinstance(auth[0], str):
          url = url + "&api_code=" + auth[0]
  
      r = requests.get(url, auth=auth)
      try:
          unspents = r.json()["unspent_outputs"]
      except ValueError, e:
          raise Exception('Invalid response from blockchain.info.')
      
      return format_unspents(unspents)