code: def from_xdr_object(cls, op_xdr_object):
          
          if not op_xdr_object.sourceAccount:
              source = None
          else:
              source = encode_check(
                  'account', op_xdr_object.sourceAccount[0].ed25519).decode()
  
          selling = Asset.from_xdr_object(
              op_xdr_object.body.createPassiveOfferOp.selling)
          buying = Asset.from_xdr_object(
              op_xdr_object.body.createPassiveOfferOp.buying)
          amount = Operation.from_xdr_amount(
              op_xdr_object.body.createPassiveOfferOp.amount)
  
          n = op_xdr_object.body.createPassiveOfferOp.price.n
          d = op_xdr_object.body.createPassiveOfferOp.price.d
          price = division(n, d)
          return cls(
              source=source,
              selling=selling,
              buying=buying,
              amount=amount,
              price=price)
docs: Creates a :class:`CreatePassiveOffer` object from an XDR Operation
          object.