def METHOD_NAME(self, epoch: int):
    # We sample as many architectures as we need
    if epoch < self.population_size:
        logger.info("Start sampling architectures to fill the population")
        # If there is no scope defined, let's use the search space default one
        model = (
            torch.nn.Module()
        )
        model.arch = self.search_space.clone()
        model.arch.sample_random_architecture(dataset_api=self.dataset_api)
        model.accuracy = model.arch.query(
            self.performance_metric, self.dataset, dataset_api=self.dataset_api
        )
        self.population.append(model)
        self._update_history(model)
        log_every_n_seconds(
            logging.INFO, "Population size {}".format(len(self.population))
        )
    else:
        sample = []
        while len(sample) < self.sample_size:
            candidate = np.random.choice(list(self.population))
            sample.append(candidate)
        parent = max(sample, key=lambda x: x.accuracy)
        child = (
            torch.nn.Module()
        )
        child.arch = self.search_space.clone()
        child.arch.mutate(parent.arch, dataset_api=self.dataset_api)
        child.accuracy = child.arch.query(
            self.performance_metric, self.dataset, dataset_api=self.dataset_api
        )
        self.population.append(child)
        self._update_history(child)