How to check file in sharepoint is opened by other user?

Hi team,

can you please provide me the exact code for this criteria.