[dev question] How do I know the pool id of a staked LP in masterchef from contract? (Get pool id from lp address)

When staking LP in master chef via:

https://preview.redd.it/nziauxfmkn191.png?width=568&format=png&auto=webp&s=de3dbb66cec7e8899e48f743e5ff22cb34fab43e

The tokens are allocated to some pool id.
Then when I want to withdraw I need this pool id, but I started knowing the LP.

https://preview.redd.it/0x4zj1nnln191.png?width=383&format=png&auto=webp&s=9f8decc434313fc42bcd89e8ab7becc71cb7127b

How do I find the pool id given that I know the LP token address ?

reddit imagereddit image[dev question] How do I know the pool id of a staked LP in masterchef from contract? (Get pool id from lp address)