def install_start_end_marker(name: str, length: float) -> str:
    """Method to add start and end marker to the lattice.

    Parameters
    ----------
    name : str
        lattice name
    length : float
        length of the lattice

    Returns
    -------
    str
        MADX install string.
    """
    # define  start and end marker
    text = "{:12}: {:12};\n".format("MSTART", "MARKER")
    text += "{:12}: {:12};\n\n".format("MEND", "MARKER")

    # start sequence edit
    text += "USE, SEQUENCE={};\n".format(name)
    text += "SEQEDIT, SEQUENCE = {};  \nFLATTEN;\n".format(name)

    # install start and end marker
    line = "INSTALL, ELEMENT = {:16}, AT = {:12.6f};\n".format("MSTART", 0.00000)
    text += line
    line = "INSTALL, ELEMENT = {:16}, AT = {:12.6f};\n".format("MEND", length)
    text += line

    # end sequence edit
    text += "FLATTEN;\nENDEDIT;"

    return text