code: def looking_at_repeat(s, state):
      if s[0] not in REPEAT_STARTS:
          return None
      if state.in_brackets:
          return None
      if not state.any_tokens:
          raise ValueError(
              "Invalid repeat placement: there is nothing to repeat"
          )
      if s[0] == "{":
          match = re.match("{([0-9]+)(,([0-9]+))?\\}", s)
          if not match:
              raise ValueError(
                  "Incomplete or badly formatted repeat expression"
              )
          if match.group(3) is not None:
              if int(match.group(1)) > int(match.group(3)):
                  raise ValueError(
                      "Minimum # of matches in %s is greater than maximum number"
                      % match.group()
                  )
          return len(match.group())
      if len(s) > 1 and s[1] == "?":
          return 2
      return 1
  
imports: import re
  import wx
  import wx.stc
label_desc: Use image node_id 3 for calling a global function with example usage: looking_at_repeat(s, state) and returns: int, None, None, len, int