code: def get_num_threads():
      num = int(os.environ.get("NUM_THREADS", 4))
      cpu_count = os.cpu_count()
      if cpu_count is not None and cpu_count < num:
          raise RuntimeError(
              f"num threads {num} larger than num cpu core deteacted, try specify num threads by `NUM_THREADS=xxx pytest ...`"
          )
      return num
  
imports: import pytest
  import operator
  import os
  import numpy
  import phe
label_desc: Use image node_id 1 for calling a global function with example usage: get_num_threads() and returns: num