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()
  
          destination = encode_check(
              'account',
              op_xdr_object.body.pathPaymentOp.destination.ed25519).decode()
          send_asset = Asset.from_xdr_object(
              op_xdr_object.body.pathPaymentOp.sendAsset)
          dest_asset = Asset.from_xdr_object(
              op_xdr_object.body.pathPaymentOp.destAsset)
          send_max = Operation.from_xdr_amount(
              op_xdr_object.body.pathPaymentOp.sendMax)
          dest_amount = Operation.from_xdr_amount(
              op_xdr_object.body.pathPaymentOp.destAmount)
  
          path = []
          if op_xdr_object.body.pathPaymentOp.path:
              for x in op_xdr_object.body.pathPaymentOp.path:
                  path.append(Asset.from_xdr_object(x))
  
          return cls(
              source=source,
              destination=destination,
              send_asset=send_asset,
              send_max=send_max,
              dest_asset=dest_asset,
              dest_amount=dest_amount,
              path=path)
docs: Creates a :class:`PathPayment` object from an XDR Operation
          object.