code: def _get_first_or_none(it):
      try:
          try:
              _next = it.next
          except AttributeError:
              return next(it)
          else:
              return _next()
      except StopIteration:
          return None
  
imports: from __future__ import absolute_import
  import re
  import operator
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: _get_first_or_none(it) and returns: _next, None, next