Code Duplication    Length = 11-11 lines in 2 locations

src/egon/data/datasets/electrical_neighbours.py 2 locations

@@ 1878-1888 (lines=11) @@
1875
        **year_start_end
1876
    )
1877
1878
    if not_retrieved:
1879
        logger.warning("Generation data from entsoe could not be retrieved.")
1880
        # check for generation backup from former runs
1881
        file_path = Path(
1882
            "./", "entsoe_data", f"gen_entsoe_{scn_name}.csv"
1883
        ).resolve()
1884
        if os.path.isfile(file_path):
1885
            df_gen_sq, not_retrieved = fill_by_backup_data_from_former_runs(
1886
                df_gen_sq, file_path, not_retrieved
1887
            )
1888
        save_entsoe_data(df_gen_sq, file_path=file_path)
1889
1890
    if not_retrieved:
1891
        logger.warning(
@@ 1689-1699 (lines=11) @@
1686
        **year_start_end
1687
    )
1688
1689
    if not_retrieved:
1690
        logger.warning("Generation data from entsoe could not be retrieved.")
1691
        # check for generation backup from former runs
1692
        file_path = Path(
1693
            "./", "entsoe_data", f"gen_entsoe_{scn_name}.csv"
1694
        ).resolve()
1695
        if os.path.isfile(file_path):
1696
            df_gen_sq, not_retrieved = fill_by_backup_data_from_former_runs(
1697
                df_gen_sq, file_path, not_retrieved
1698
            )
1699
        save_entsoe_data(df_gen_sq, file_path=file_path)
1700
1701
    if not_retrieved:
1702
        logger.warning(