def METHOD_NAME(self, rar_path, extract_path, password):
    """Extracts a nested RAR file.
    @param rar_path: RAR path
    @param extract_path: where to extract
    @param password: RAR password
    """
    # Test if rar file contains a file named as itself.
    if self.is_overwritten(rar_path):
        log.debug("RAR file contains a file with the same name, original is going to be overwrite")
        # TODO: add random string.
        new_rar_path = f"{rar_path}.old"
        shutil.move(rar_path, new_rar_path)
        rar_path = new_rar_path
    # Extraction.
    with RarFile(rar_path, "r") as archive:
        try:
            archive.extractall(path=extract_path, pwd=password)
        except BadRarFile:
            raise CuckooPackageError("Invalid Rar file")
        except RuntimeError:
            try:
                archive.extractall(path=extract_path, pwd="infected")
            except RuntimeError as e:
                raise CuckooPackageError(f"Unable to extract Rar file: {e}")
        finally:
            # Extract nested archives.
            for name in archive.namelist():
                if name.endswith(".rar"):
                    # Recurse.
                    self.METHOD_NAME(os.path.join(extract_path, name), extract_path, password)