code: def test_run_end_at(
      builder: EnsembleBuilder, time_buffer: int, duration: int
  ) -> None:
      """
      Expects
      -------
      * The limits enforced by pynisher should account for the time_buffer and duration
        to run for + a little bit of overhead that gets rounded to a second.
      """
      with patch("pynisher.enforce_limits") as pynisher_mock:
          builder.run(
              end_at=time.time() + duration,
              iteration=1,
              time_buffer=time_buffer,
              pynisher_context="forkserver",
          )
          # The 1 comes from the small overhead in conjuction with rounding down
          expected = duration - time_buffer - 1
  
          # The 1 comes from the small overhead in conjuction with rounding down
          expected = duration - time_buffer - 1
          assert (
              pynisher_mock.call_args_list[0][1]["wall_time_in_s"]
              == expected
          )
  
imports: from __future__ import annotations
  from typing import Callable
  import random
  import time
  from pathlib import Path
  import numpy
  from autosklearn.automl_common.common.utils.backend import Backend
  from autosklearn.ensemble_building import EnsembleBuilder, Run
  from autosklearn.metrics import Scorer, accuracy, make_scorer
  from autosklearn.util.functional import bound, pairs
  import pytest
  from pytest_cases import fixture, parametrize
  from unittest.mock import Mock, patch
  from test.conftest import DEFAULT_SEED
  from test.fixtures.metrics import acc_with_X_data
label_desc: Use image node_id 27 for calling a global function with example usage: test_run_end_at(builder, time_buffer, duration) without return types