a Blender python beginner here. I'm sorry if this is a trivial question but I couldn't find an answer for this anywhere.
I am making a script that checks if selected object is in local view and if it is, it will toggle it back to global view. Something like this:
if bpy.context.active_object.local_view_get() == True:
However I don't really understand what the viewport parameter should be, I tried to find answer but I guess my understanding of Blender classes is still very poor.