from pathlib import Path


def single_duplicate_bond_index_v3000_sdf(tmp_path: Path) -> Path:
    """Write a single molecule to a v3000 sdf with a duplicate bond index.

    Args:
        tmp_path: pytest fixture for writing files to a temp directory

    Returns:
        Path to the sdf
    """
    sdf_text = """


  0  0  0     0  0            999 V3000
M  V30 BEGIN CTAB
M  V30 COUNTS 9 9 0 0 0
M  V30 BEGIN ATOM
M  V30 1 C 87.71 -95.64 0 0
M  V30 2 C 87.71 -81.29 0 0
M  V30 3 C 100.18 -74.09 0 0
M  V30 4 C 100.18 -59.69 0 0
M  V30 5 C 87.71 -52.49 0 0
M  V30 6 C 75.24 -59.69 0 0
M  V30 7 C 75.24 -74.09 0 0
M  V30 8 C 87.71 -38.09 0 0
M  V30 9 O 100.18 -30.89 0 0
M  V30 END ATOM
M  V30 BEGIN BOND
M  V30 1 1 1 2
M  V30 2 1 2 3
M  V30 3 2 3 4
M  V30 4 1 4 5
M  V30 5 2 5 6
M  V30 6 1 6 7
M  V30 7 2 7 2
M  V30 1 1 5 8
M  V30 9 2 8 9
M  V30 END BOND
M  V30 END CTAB
M  END
$$$$
"""
    outpath = tmp_path / "input.sdf"
    with open(outpath, "w") as outh:
        outh.write(sdf_text)
    return outpath