code: def batch_status_job_counter(batch_status, job_state):
      return len(
          [j for j in batch_status["jobs"] if j["state"] == job_state]
      )
  
file_path: hail/batch/test/utils.py
imports: import inspect
  import os
  from typing import Union, overload
  import hailtop.batch_client.aioclient
  import hailtop.batch_client.client
  from hailtop import pip_version
label_desc: Use image node_id 4 for calling a global function with example usage: batch_status_job_counter(batch_status, job_state) and returns: len