def METHOD_NAME(options):
    # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_")
    if not options.workdir:
        options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_")
    structure = abidata.structure_from_ucell("MgB2")
    # Get pseudos from a table.
    table = abilab.PseudoTable(abidata.pseudos("12mg.pspnc", "5b.pspnc"))
    pseudos = table.get_pseudos_for_structure(structure)
    nval = structure.num_valence_electrons(pseudos)
    #print(nval)
    flow = flowtk.Flow(workdir=options.workdir)
    scf_work = flowtk.Work()
    ngkpt_list = [[4, 4, 4], [8, 8, 8], [12, 12, 12]]
    tsmear_list = [0.01, 0.02, 0.04]
    for ngkpt in ngkpt_list:
        for tsmear in tsmear_list:
            scf_input = make_scf_input(structure, ngkpt, tsmear, pseudos)
            scf_work.register_scf_task(scf_input)
    flow.register_work(scf_work)
    # This call uses the information reported in the GS task to
    # compute all the independent atomic perturbations corresponding to a [4, 4, 4] q-mesh.
    for scf_task in scf_work:
        ph_work = flowtk.PhononWork.from_scf_task(scf_task, qpoints=[4, 4, 4], is_ngqpt=True)
        flow.register_work(ph_work)
    return flow.allocate(use_smartio=True)