code: def _repeat_elements(
      list_to_replicate: List[bool], n_repeats: int
  ) -> pd.Series:
      return pd.Series(
          [item for item in list_to_replicate for _ in range(n_repeats)]
      )
  
imports: import random
  from typing import List
  from unittest.mock import MagicMock, patch
  import pandas
  import torch
  from ax.core.arm import Arm
  from ax.core.batch_trial import BatchTrial
  from ax.core.data import Data
  from ax.core.generator_run import GeneratorRun
  from ax.core.objective import ScalarizedObjective
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.outcome_constraint import OutcomeConstraint
  from ax.core.types import ComparisonOp
  from ax.exceptions.core import UserInputError
  from ax.modelbridge.cross_validation import AssessModelFitResult
  from ax.modelbridge.registry import Models
  from ax.modelbridge.torch import TorchModelBridge
  from ax.plot.pareto_utils import get_tensor_converter_model
  from ax.service.utils.best_point import _derel_opt_config_wrapper, _is_row_feasible, extract_Y_from_data, get_best_parameters, get_best_raw_objective_point, logger
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import not_none
  from ax.utils.testing.core_stubs import get_branin_experiment, get_branin_metric, get_experiment_with_observations, get_sobol
  from ax.utils.testing.mock import fast_botorch_optimize
label_desc: Use image node_id 1 for calling a global function with example usage: _repeat_elements(list_to_replicate, n_repeats) and returns: pd