def METHOD_NAME(self, filename: str, binary=True):
    """Write mesh to file.
    :param filename: Name of file.
    :param binary: Write as binary file if True.
    """
    binary_flag = 1 if binary else 0
    gmsh.option.setNumber("Mesh.Binary", binary_flag)
    gmsh.METHOD_NAME(filename)