code: def _extract_values(obj, key):
      """Pull all values of specified key from nested JSON."""
      arr = []
  
      def extract(obj, arr, key):
          """Recursively search for values of key in JSON tree."""
          if isinstance(obj, dict):
              for k, v in obj.items():
                  if isinstance(v, (dict, list)):
                      extract(v, arr, key)
                  elif k == key:
                      arr.append(v)
          elif isinstance(obj, list):
              for item in obj:
                  extract(item, arr, key)
          return arr
  
      results = extract(obj, arr, key)
      return results
  
file_path: cusignal/python/cusignal/io/reader.py
imports: import json
  import re
  import cupy
  import numpy
  from ._reader_cuda import _unpack
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_values(obj, key) and returns: results, arr