code: def CoinFromRef(coin_ref, tx_output, state=CoinState.Unconfirmed, transaction=None):
          
          coin = Coin(coin_reference=coin_ref, tx_output=tx_output, state=state)
          coin._transaction = transaction
          return coin
docs: Get a Coin object using a CoinReference.
  
          Args:
              coin_ref (neo.Core.CoinReference): an object representing a single UTXO / transaction input.
              tx_output (neo.Core.Transaction.TransactionOutput): an object representing a transaction output.
              state (neo.Core.State.CoinState):
  
          Returns:
              Coin: self.