parameters: (current_suite: List[TestRuntime], test_runtime: float,
                        max_suite_runtime: float, max_tests_per_suite: Optional[int])
return_statement: return False
docstring: Check if a new suite should be created for the given suite.
  
      :param current_suite: Suite currently being added to.
      :param test_runtime: Runtime of test being added.
      :param max_suite_runtime: Max runtime of a single suite.
      :param max_tests_per_suite: Max number of tests in a suite.
      :return: True if a new test suite should be created.
docstring_summary: Check if a new suite should be created for the given suite.
docstring_tokens: Check if a new suite should be created for the given suite .
function: def _new_suite_needed(current_suite: List[TestRuntime], test_runtime: float,
                        max_suite_runtime: float, max_tests_per_suite: Optional[int]) -> bool:
      """
      Check if a new suite should be created for the given suite.
  
      :param current_suite: Suite currently being added to.
      :param test_runtime: Runtime of test being added.
      :param max_suite_runtime: Max runtime of a single suite.
      :param max_tests_per_suite: Max number of tests in a suite.
      :return: True if a new test suite should be created.
      """
      current_runtime = sum(test.runtime for test in current_suite)
      if current_runtime + test_runtime > max_suite_runtime:
          # Will adding this test put us over the target runtime?
          return True
  
      if max_tests_per_suite and len(current_suite) + 1 > max_tests_per_suite:
          # Will adding this test put us over the max number of tests?
          return True
  
      return False
function_tokens: def _new_suite_needed ( current_suite : List [ TestRuntime ] , test_runtime : float , max_suite_runtime : float , max_tests_per_suite : Optional [ int ] ) -> bool : current_runtime = sum ( test . runtime for test in current_suite ) if current_runtime + test_runtime > max_suite_runtime : # Will adding this test put us over the target runtime? return True if max_tests_per_suite and len ( current_suite ) + 1 > max_tests_per_suite : # Will adding this test put us over the max number of tests? return True return False