def METHOD_NAME(self, targets=("defconfig"), extra_configs=None):
    """
    Configure/prepare kernel source to build.
    :param targets: configuration targets. Default is 'defconfig'.
    :type targets: list of str
    :param extra_configs: additional configurations in the form of
                          CONFIG_NAME=VALUE.
    :type extra_configs: list of str
    """
    build.make(self._build_dir, extra_args=f"-C {self._build_dir} mrproper")
    if self.config_path is not None:
        dotconfig = os.path.join(self._build_dir, ".config")
        shutil.copy(self.config_path, dotconfig)
        build.make(self._build_dir, extra_args=f"-C {self._build_dir} olddefconfig")
    else:
        if isinstance(targets, list):
            _targets = " ".join(targets)
        else:
            _targets = targets
        build.make(self.build_dir, extra_args=f"-C {self.build_dir} {_targets}")
    if extra_configs:
        with tempfile.NamedTemporaryFile(
            mode="w+t", prefix="avocado_"
        ) as config_file:
            config_file.write("\n".join(extra_configs))
            config_file.flush()
            cmd = [
                "cd",
                self._build_dir,
                "&&",
                "./scripts/kconfig/merge_config.sh",
                ".config",
                config_file.name,
            ]
            process.run(" ".join(cmd), shell=True)