I'm having trouble interacting with Wolfram in Python

I have some tough problems:

As shown in Figure_1. How to use the Global.x in wlexpr( )?

Figure_1.png

Further more. As shown in Figure_2.
How to use python’s interface “wl” to represent the “f” in this expression?

Figure_2.png

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. Posting code Images doesn’t help other members to copy your code. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

You can also embed notebook or attach notebook.