def METHOD_NAME(self, fcidump: str | Path) -> None:
    """Dumps an FCIDump object to a file.
    Args:
        fcidump: Path to the output file.
    Raises:
        QiskitNatureError: not all beta-spin related matrices are either None or not None.
        QiskitNatureError: if the dimensions of the provided integral matrices do not match.
    """
    outpath = fcidump if isinstance(fcidump, Path) else Path(fcidump)
    # either all beta variables are None or all of them are not
    if not all(h is None for h in [self.hij_b, self.hijkl_ba, self.hijkl_bb]) and not all(
        h is not None for h in [self.hij_b, self.hijkl_ba, self.hijkl_bb]
    ):
        raise QiskitNatureError("Invalid beta variables.")
    if set(self.hij.shape) != set(self.hijkl.shape):
        raise QiskitNatureError(
            "The number of orbitals of the 1- and 2-body matrices do not match: "
            f"{set(self.hij.shape)} vs. {set(self.hijkl.shape)}"
        )
    norb = self.hij.shape[0]
    nelec = self.num_electrons
    einact = self.constant_energy
    ms2 = self.multiplicity - 1
    mos = range(norb)
    with outpath.open("w", encoding="utf8") as outfile:
        # print header
        outfile.write(f"&FCI NORB={norb:4d},NELEC={nelec:4d},MS2={ms2:4d},\n")
        if self.orbsym is None:
            outfile.write(" ORBSYM=" + "1," * norb + ",\n")
        else:
            if len(self.orbsym) != norb:
                raise QiskitNatureError(f"Invalid number of orbitals {norb} {len(self.orbsym)}")
            outfile.write(" ORBSYM=" + ",".join(str(o) for o in self.orbsym) + ",\n")
        outfile.write(f" ISYM={self.isym:d},\n&END\n")
        # append 2e integrals
        _dump_2e_ints(self.hijkl, mos, outfile)
        if self.hijkl_ba is not None:
            _dump_2e_ints(np.transpose(self.hijkl_ba), mos, outfile, beta=1)
        if self.hijkl_bb is not None:
            _dump_2e_ints(self.hijkl_bb, mos, outfile, beta=2)
        # append 1e integrals
        _dump_1e_ints(self.hij, mos, outfile)
        if self.hij_b is not None:
            _dump_1e_ints(self.hij_b, mos, outfile, beta=True)
        # TODO append MO energies (last three indices are 0)
        # append inactive energy
        if einact is not None:
            _write_to_outfile(outfile, einact, (0, 0, 0, 0))