pub fn is_main_thread() -> bool
Returns true if the current thread is the main Python thread. Compares the current thread’s native ID against the main Python thread’s native ID.