code: def JSONArray(
      s_and_end, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR
  ):
      s, end = s_and_end
      values = []
      nextchar = s[end : end + 1]
      if nextchar in _ws:
          end = _w(s, end + 1).end()
          nextchar = s[end : end + 1]
      # Look-ahead for trivial empty array
      if nextchar == "]":
          return values, end + 1
      _append = values.append
      while True:
          try:
              value, end = scan_once(s, end)
          except StopIteration as err:
              raise JSONDecodeError(
                  "Expecting value", s, err.value
              ) from None
          _append(value)
          nextchar = s[end : end + 1]
          if nextchar in _ws:
              end = _w(s, end + 1).end()
              nextchar = s[end : end + 1]
          end += 1
          if nextchar == "]":
              break
          elif nextchar != ",":
              raise JSONDecodeError(
                  "Expecting ',' delimiter", s, end - 1
              )
          try:
              if s[end] in _ws:
                  end += 1
                  if s[end] in _ws:
                      end = _w(s, end + 1).end()
          except IndexError:
              pass
  
      return values, end
  
file_path: catboost/contrib/tools/python3/src/Lib/json/decoder.py
imports: import re
  from json import scanner
label_desc: Use image node_id 4 for calling a global function with example usage: JSONArray(s_and_end, scan_once, _w, _ws) and returns: values,  end, values,  unknown