def build_filename(fname: dict) -> str:
    """
    returns filename given a dictionary with name components
    """
    filename = fname["name"]
    assert "out_src" in fname, "Named_dict (fname) does not contain 'out' keys."

    filename = filename + "." + fname["out_src"] + "-" + fname["out_tgt"] + "." + fname["out_ext"]

    return filename