code: def _get_span(s, pattern):
      """Return the span of the first group that matches the pattern."""
      i, j = -1, -1
  
      match = pattern.match(s)
      if not match:
          return i, j
  
      for group_name in pattern.groupindex:
          i, j = match.span(group_name)
          if (i, j) != (-1, -1):
              return i, j
  
      return i, j
  
imports: from functools import partial
  from importlib import import_module
  from itertools import chain
  import re
  import shlex
  import sys
  from sklearn.base import BaseEstimator
  from sklearn.pipeline import FeatureUnion
  from sklearn.pipeline import Pipeline
label_desc: Use image node_id 2 for calling a global function with example usage: _get_span(s, pattern) and returns: i,  j, i,  j, i,  j