code: def check_running_job_count():
      
      try:
          job_list = current_k8s_batchv1_api_client.\
              list_job_for_all_namespaces()
          if len(job_list.items) > K8S_MAXIMUM_CONCURRENT_JOBS:
              return False
      except ApiException as e:
          log.error('Something went wrong while getting running job list.')
          log.error(e)
          return False
      return True
docs: Check upper limit on running jobs.