<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ListThreads(self):
 """List the currently running python threads. Returns: A list of the inferior's thread idents, or None if the debugger is not attached to any process. """

    if self.inferior.is_running:
      return self.inferior.threads
    logging.error('Not attached to any process.')
    return []