parameters: (process, reason)
return_statement: return threads[0]
docstring: A convenience function which returns the first thread with the given stop
      reason or None.
  
      Example usages:
  
      1. Get the stopped thread due to a breakpoint condition
  
      ...
          from lldbutil import get_stopped_thread
          thread = get_stopped_thread(process, lldb.eStopReasonPlanComplete)
          self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
      ...
  
      2. Get the thread stopped due to a breakpoint
  
      ...
          from lldbutil import get_stopped_thread
          thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
          self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint")
      ...
docstring_summary: A convenience function which returns the first thread with the given stop
      reason or None.
docstring_tokens: A convenience function which returns the first thread with the given stop reason or None .
function: def get_stopped_thread(process, reason):
      """A convenience function which returns the first thread with the given stop
      reason or None.
  
      Example usages:
  
      1. Get the stopped thread due to a breakpoint condition
  
      ...
          from lldbutil import get_stopped_thread
          thread = get_stopped_thread(process, lldb.eStopReasonPlanComplete)
          self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
      ...
  
      2. Get the thread stopped due to a breakpoint
  
      ...
          from lldbutil import get_stopped_thread
          thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
          self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint")
      ...
  
      """
      threads = get_stopped_threads(process, reason)
      if len(threads) == 0:
          return None
      return threads[0]
function_tokens: def get_stopped_thread ( process , reason ) : threads = get_stopped_threads ( process , reason ) if len ( threads ) == 0 : return None return threads [ 0 ]