def METHOD_NAME(
    LOT: str,
    molecule: Optional[psi4.core.Molecule] = None,
    serverdata: Union[str, bool] = False,
    options: Optional[Dict] = None
) -> IPIBroker:
    """Runs :class:`~psi4.driver.ipi_broker.IPIBroker` to connect to i-PI (https://ipi-code.org/).
    Parameters
    ----------
    LOT
        level of theory
    molecule
        Initial molecule
    serverdata
        Configuration where to connect to ipi
    options
        any additional Psi4 options
    """
    b = IPIBroker(LOT, molecule=molecule, serverdata=serverdata, options=options)
    try:
        if b.serverdata:
            b.run()
        else:
            return b
    except KeyboardInterrupt:
        psi4.core.print_out("Killing IPIBroker\n")
        b.__del__()  # lgtm [py/explicit-call-to-delete]
        sys.exit(1)