try:
    from gevent import monkey
    [start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportError:
    from thread import start_new_thread


def thread(func):
    """Thread decorator

    Takes a function and spawns it as a daemon thread using the
    real OS thread regardless of monkey patching.

    """
    start_new_thread(func, ())

from __future__ import absolute_import

try:
    from gevent._threading import start_new_thread
except ImportError:
    from thread import start_new_thread


def thread(func):
    """Thread decorator

    Takes a function and spawns it as a daemon thread using the
    real OS thread regardless of monkey patching.

    """
    start_new_thread(func, ())

Make sure we use proper gevent with absolute import, pull the start_new_thread directly out.
Make sure we use proper gevent with absolute import, pull the start_new_thread directly out.

+ from __future__ import absolute_import
+ 
  try:
+     from gevent._threading import start_new_thread
-     from gevent import monkey
-     [start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
  except ImportError:
      from thread import start_new_thread
  
  
  def thread(func):
      """Thread decorator
  
      Takes a function and spawns it as a daemon thread using the
      real OS thread regardless of monkey patching.
  
      """
      start_new_thread(func, ())
  
Make sure we use proper gevent with absolute import, pull the start_new_thread directly out.
## Code Before:
try:
    from gevent import monkey
    [start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportError:
    from thread import start_new_thread


def thread(func):
    """Thread decorator

    Takes a function and spawns it as a daemon thread using the
    real OS thread regardless of monkey patching.

    """
    start_new_thread(func, ())

## Instruction:
Make sure we use proper gevent with absolute import, pull the start_new_thread directly out.
## Code After:
from __future__ import absolute_import

try:
    from gevent._threading import start_new_thread
except ImportError:
    from thread import start_new_thread


def thread(func):
    """Thread decorator

    Takes a function and spawns it as a daemon thread using the
    real OS thread regardless of monkey patching.

    """
    start_new_thread(func, ())
